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_imagebuilder_distribution_configuration: Add support for sharing AMIs with Organizations and OUs #21929

Closed
davidferguson-cr opened this issue Nov 27, 2021 · 3 comments · Fixed by #22104
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/imagebuilder Issues and PRs that pertain to the imagebuilder service.

Comments

@davidferguson-cr
Copy link

davidferguson-cr commented Nov 27, 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

Amazon EC2 Image Builder has added the ability to share Amazon Machine Images (AMIs) with AWS Organizations and Organizational Units (OUs) (rather than just individual accounts) in the image distribution phase of the build process. This means we no longer have to update AMI permissions for individual AWS accounts every time a new account is added.

Extend the existing aws_imagebuilder_distribution_configuration resource and data source to enable the use of this capability within Terraform.

New or Affected Resource(s)

  • aws_imagebuilder_distribution_configuration (affected resource): requires new organizational_unit_arns and organization_arns sub-arguments within the distribution.ami_distribution_configuration.launch_permission argument.
  • aws_imagebuilder_distribution_configuration (affected data source): requires new organizational_unit_arns and organization_arns sub-attributes within the distribution.ami_distribution_configuration.launch_permission attribute.

Potential Terraform Configuration

resource "aws_imagebuilder_distribution_configuration" "example" {
  name = "example"

  distribution {
    ami_distribution_configuration {
      ami_tags = {
        CostCenter = "IT"
      }

      name = "example-{{ imagebuilder:buildDate }}"

      launch_permission {
        organizational_unit_arns = ["arn:aws:organizations::123456789123:ou/o-foobar123/ou-1foo-2foobar"],
        organization_arns = ["arn:aws:organizations::123456789123:organization/o-foobar123"]
      }
    }

    region = "us-east-1"
  }
}

Requires

References

@davidferguson-cr davidferguson-cr added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 27, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/imagebuilder Issues and PRs that pertain to the imagebuilder service. labels Nov 27, 2021
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Dec 9, 2021
@MaxCCC
Copy link

MaxCCC commented Mar 11, 2022

@justinretzolk / @ewbankkit Any chance the PR will be reviewed soon? Many people are waiting for this for months

@benjy44
Copy link

benjy44 commented Mar 21, 2022

the new awscc provider gives the ability to share AMIs with OUs fyi: https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/imagebuilder_distribution_configuration

@github-actions
Copy link

github-actions bot commented May 6, 2022

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 6, 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/imagebuilder Issues and PRs that pertain to the imagebuilder service.
Projects
None yet
4 participants