-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 Auto Scaling groups with multiple launch templates using a mixed instances policy #16325
Add Support Auto Scaling groups with multiple launch templates using a mixed instances policy #16325
Conversation
Looking for review and feedback to get it merged into the main branch. |
4d83795
to
d5adfb6
Compare
Synced fork with master branch. |
@AdamTylerLynch thanks much for throwing this PR together. I'm looking forward to using this functionality to run both x86 and ARM instances in the same auto scaling group. It looks like this PR gained a merge conflict since it was opened. Is there anyway I can help clear the merge conflict so we can get this PR reviewed and merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, @AdamTylerLynch! I've suggested one minor tweak in the documentation and an addition to the new acceptance test.
…set. Verify that no override LT is set for x86.
…aunch template overrides in a mixed instance policy.
Output from acceptance tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 🚀
Acceptance test results in Commercial partition
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (77.59s)
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (117.82s)
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (118.03s)
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (139.72s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (150.59s)
--- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (152.07s)
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (156.82s)
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (55.43s)
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (175.69s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (62.95s)
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (188.92s)
--- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (191.37s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (44.95s)
--- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (83.50s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (58.21s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_CapacityRebalance (64.29s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (61.64s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_UpdateToZeroOnDemandBaseCapacity (76.60s)
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (267.69s)
--- PASS: TestAccAWSAutoScalingGroup_InstanceRefresh_Basic (268.05s)
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (271.83s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (274.51s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/empty_list (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/nil (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/defaults (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/instance_warmup_only (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/instance_warmup_zero (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/instance_warmup_empty_string (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/min_healthy_percentage_only (0.00s)
--- PASS: TestCreateAutoScalingGroupInstanceRefreshInput/preferences (0.00s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (38.86s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (97.68s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (89.71s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (166.07s)
--- PASS: TestAccAWSAutoScalingGroup_basic (306.09s)
--- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (39.29s)
--- PASS: TestAccAWSAutoScalingGroup_tags (324.64s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType_With_LaunchTemplateSpecification (61.37s)
--- PASS: TestAccAWSAutoScalingGroup_InstanceRefresh_Triggers (253.96s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (103.67s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (77.88s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (110.85s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (85.56s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (353.77s)
--- PASS: TestAccAWSAutoScalingGroup_InstanceRefresh_Start (357.89s)
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (428.44s)
--- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (289.89s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (452.95s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (216.91s)
Hi @AdamTylerLynch! Would you be able to add a file for the changelog? Then we can get this merged. Instructions are here: Contents would be
|
I'm sorry about not including the changelog in the initial PR. My apologies. |
This has been released in version 3.30.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 for triage. Thanks! |
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! |
Community Note
Overview
Amazon EC2 Auto Scaling now lets you configure your Auto Scaling group with multiple launch templates when you use a MixedInstancesPolicy and specify multiple instance types. After EC2 Auto Scaling released support for multiple instance types within a single Auto Scaling group, customers have been looking for ways to launch different instance types using different Amazon Machine Images (AMIs) so that instances with incompatible CPU architectures can exist in the same Auto Scaling group. With this enhancement you can now specify a launch template alongside the instance type in the overrides of your MixedInstancesPolicy, and that launch template will be used whenever launching instances of its corresponding instance type.
Closes #16324
Release note for CHANGELOG:
Requires
Requires AWS SDK v1.35.32
Output from acceptance testing: