Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing public for aws_ami and aws_ami_from_instance #11101

Closed
cadavre opened this issue Dec 3, 2019 · 3 comments · Fixed by #21694
Closed

Missing public for aws_ami and aws_ami_from_instance #11101

cadavre opened this issue Dec 3, 2019 · 3 comments · Fixed by #21694
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@cadavre
Copy link

cadavre commented Dec 3, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently there's no way to mark created AMI image as available public. Proposal is to add public parameter that defaults to false. Setting to true would mark AMI public and accessible for all.

New or Affected Resource(s)

  • aws_ami
  • aws_ami_from_instance
  • aws_ami_copy (nice-to-have)

Potential Terraform Configuration

resource "aws_ami_from_instance" "my_ami" {
  name               = "my-ami"
  source_instance_id = aws_instance.ami_source.id
  public             = true
}
@cadavre cadavre added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 3, 2019
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Dec 3, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 3, 2019
@atz
Copy link
Contributor

atz commented Apr 22, 2020

I think this implies reworking aws_ami_launch_permission to accept more than just an account_id (specifically public). Or is it the (undocumented) case that aws_ami_launch_permission already accepts public as an account_id?

If I try to construct a launch permission with account_id="public" (or "all"), I get:

Error: error creating ami launch permission: InvalidAMIAttributeItemValue: Invalid attribute item value "public " for userId item type.
... or ...
Error: error creating ami launch permission: InvalidAMIAttributeItemValue: Invalid attribute item value "all " for userId item type.

So I think the launch permission has to change to unblock this. (Not sure why the extra space in the error messages' quote marks.)

@grahamc
Copy link
Contributor

grahamc commented Aug 25, 2021

I've implemented this in #20677, and you can use it pretty easily if you're using Nix to manage your Terraform environment. See: #20677 (comment)

@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Aug 26, 2021
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
4 participants