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

EC2 Image Builder: Create a new version of launch template after successful build #20739

Closed
Arrayly opened this issue Aug 31, 2021 · 8 comments
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/imagebuilder Issues and PRs that pertain to the imagebuilder service.

Comments

@Arrayly
Copy link

Arrayly commented Aug 31, 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

Please add the parameters launch_template_id (string) and update_launch_template_version (bool) in the ami_distribution_configuration block to instruct EC2 Image Builder to create a new version of the launch template that includes the latest AMI ID after the build completes. This is useful for updating an existing autoscaling group to use the new AMI.

Currently, when the resource is deployed, I have to manually go into the dashboard to set the launch template id in the distribution configuration.

New or Affected Resource(s)

aws_imagebuilder_distribution_configuration

Potential Terraform Configuration

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

  distribution {
    ami_distribution_configuration {
         
           launch_template_id = "lt-xxxxxxxxxxxxxx"
           update_launch_template_version = true

    }

    region = "us-east-1"
  }
}

Thank you! :)

@Arrayly Arrayly added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 31, 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 Aug 31, 2021
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Aug 31, 2021
@jleonardolemos
Copy link

I am very interested in this feature. I am willing to try a PR but i don know how to start, just point me to the right direction and i will try.

@Arrayly
Copy link
Author

Arrayly commented Sep 25, 2021

@jleonardolemos
You may use this to help you get started. I had to convert it to terraform for my own project and then ran into this issue. If you look closely in the template.yaml it has the following configuration which is missing in terraform:

LaunchTemplateConfigurations:
   - LaunchTemplateId: !Ref SampleLaunchTemplate
     AccountId: !Sub ${AWS::AccountId}
     SetDefaultVersion: true

I hope this gives you a better understanding.

@simoferr98
Copy link

are there any updates for this future integration?

@jleonardolemos
Copy link

@simoferr98 not for my side

@rmccarthy-ellevation
Copy link

Any updates on this?

@kamilturek
Copy link
Collaborator

Should have been closed via #22842.

@kamilturek
Copy link
Collaborator

Hey @ewbankkit, could we please close this issue? It has many upvotes but the argument has been already added to the resource.

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

No branches or pull requests

7 participants