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

aws_ami_launch_permission: Support for OrganizationalUnitArn.N and OrganizationArn.N #21617

Closed
gudlyf opened this issue Nov 3, 2021 · 4 comments · Fixed by #21694
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@gudlyf
Copy link

gudlyf commented Nov 3, 2021

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 other comments that do not add relevant new information or questions, 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

AWS now has support for sharing AMIs to an Organization or OrganizationUnit (OU) by specifying the ID/Arn of the Organization or OU, rather than the account number. This allows for sharing an AMI to an entire Organization or OU in its entirety, rather than continually adding account IDs as they are added to an Organization or OU.

New or Affected Resource(s)

  • aws_ami_launch_permission

Potential Terraform Configuration

resource "aws_ami_launch_permission" "ou_example" {
  image_id                = "ami-12345678"
  organizational_unit_arn = "arn:aws:organizations::123456789123:ou/o-foobar123/ou-1foo-2foobar"
}

resource "aws_ami_launch_permission" "org_example" {
  image_id         = "ami-12345678"
  organization_arn = "arn:aws:organizations::123456789123:root/o-foobar123/r-1foo"
}

References

https://aws.amazon.com/about-aws/whats-new/2021/10/amazon-ec2-amazon-machine-images-organizations/

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyImageAttribute.html

@gudlyf gudlyf added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 3, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 3, 2021
@joraff
Copy link
Contributor

joraff commented Nov 3, 2021

Anyone already start on this? It'd be helpful for my org so I'm willing to give it a go

What do others think about modifying the existing resource aws_ami_launch_permission versus creating a new resource, such as aws_ami_launch_permission_org? The existing resource does not expect a full ARN, only the account ID, whereas these new sharing recipients should be specified with their full ARNs.

@dmccaffery
Copy link

dmccaffery commented Apr 8, 2022

@ewbankkit any chance we can get this reviewed and merged to maintain parity with the recently merged image builder implementation?

#22104

@github-actions github-actions bot added this to the v4.10.0 milestone Apr 13, 2022
@github-actions
Copy link

This functionality has been released in v4.10.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@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 15, 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
Development

Successfully merging a pull request may close this issue.

4 participants