fix(cloudformation): honor LaunchTemplate/MixedInstancesPolicy on CFN AutoScalingGroup#2017
Merged
Conversation
… AutoScalingGroup The CFN AWS::AutoScaling::AutoScalingGroup provisioner read only the legacy LaunchConfigurationName and hardcoded launch_template: None, so a group declared with a LaunchTemplate (the modern CDK/CFN shape) or a MixedInstancesPolicy was created with no launch spec at all and DescribeAutoScalingGroups reported none. It now parses the LaunchTemplate / LaunchTemplateSpecification block (LaunchTemplateId/LaunchTemplateName + Version) and carries it onto the group. Adds an e2e test asserting a CFN ASG with a LaunchTemplate reports it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug-hunt batch 6 (cycle 6).
The CFN
AWS::AutoScaling::AutoScalingGroupprovisioner read only the legacyLaunchConfigurationNameand hardcodedlaunch_template: None, so a group declared with aLaunchTemplate(the modern CDK/CFN shape) or aMixedInstancesPolicywas created with no launch spec at all and DescribeAutoScalingGroups reported none. It now parses the LaunchTemplate / LaunchTemplateSpecification block (LaunchTemplateId/LaunchTemplateName+Version) and carries it onto the group.E2E test asserts a CFN ASG with a LaunchTemplate reports it. Builds clean; clippy
-D warningsclean.(The sibling finding — CFN ASG/RDS minting placeholder instances/DBs with no real container — is the larger architectural "provisioner should spawn through the real runtime" change, tracked separately.)
Summary by cubic
Fixes CloudFormation
AWS::AutoScaling::AutoScalingGroupto honorLaunchTemplateandMixedInstancesPolicy. CFN-created groups now retain and report their launch template instead of dropping it.LaunchTemplate/LaunchTemplateSpecification(LaunchTemplateId/LaunchTemplateName+Version) and persist it to the group; keeps support forLaunchConfigurationName.fakecloud-e2everifyingDescribeAutoScalingGroupsreturns the launch template for a CFN ASG.Written for commit 9234c9c. Summary will update on new commits.