-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add support for EC2 Launch Templates #2505
Comments
For what its worth, it seems these will help resolve the lack of volume tagging provided by the autoscaling group API (#1788). |
Right now, this is the only way to configure an auto scaling group with the T2 Unlimited feature. |
The use case I would like to use it for would be making patching via immutable AMIs much easier with Terraform. Right now since Launch Configurations are immutable and not versioned, it's a resource change to point an ASG to a new Launch Configuration. Since now ASGs can launch instances based on a default version of a Launch Template, Terraform can create the infrastructure but have CloudWatch events/Lambda orchestration manage the AMI version in a pipeline through the environments. Thinking through this without knowing how the code works, the ideal situation would seem to be putting a boolean on the Launch Template to tell terraform to manage versions or not. If true, it would create/destroy versions to line up with the code. If false, you could create a first version in Terraform to kickstart your project. It would not be explicitly set as default (so terraform wouldn't try to "correct" it later) but rather just be the implicit default version by being the only one. When you want to patch, you can have your lambda functions copy up the AMI from the lower environment, copy the default version of the launch configuration except for the AMI ID update, save it as a new version, and set the new as default. As a backup plan if that boolean option wasn't possible, we could use a data provider and manage the launch configuration separately from the main project, but it would be nicer to have all the code in the same place for hooking up security groups, etc. |
Hi @aggallim! Thanks for this feature request. The Terraform team at HashiCorp won't be able to work on this in the very near future due to our focus being elsewhere -- not to mention the impending holiday break -- but we'd be happy to review a pull request if you or someone else has the time and motivation to implement it. Alternatively, if others would also like to see this implemented I'd encourage adding a 👍 upvote reaction to the original issue comment (not to this comment), which we use as one of the inputs to prioritize work for the Terraform team. |
I've created a WIP PR but have some questions about how to handle this better. |
Shout out to @kl4w! The new |
Fab work, thanks all! |
This has been released in version 1.15.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
Is there any way to use a launch template with a spot fleet? |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
AWS have announced EC2 Launch Templates. These are to be a 'first class citizen' passing configuration to Autoscaling groups and Spot fleet deployments. This likely to become a long term replacement for launch configurations.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html
The text was updated successfully, but these errors were encountered: