(autoscaling): applyCloudFormationInit on each launchTemplateOverrides of mixedInstancesPolicy #31315
Labels
@aws-cdk/aws-autoscaling
Related to Amazon EC2 Auto Scaling
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
needs-reproduction
This issue needs reproduction.
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
Reopening of #27030
In the Construct AutoscalingGroup when setting a CloudFormationInit, the UserData is apply on the LaunchTemplate attach to the ASG. (attach here)
In case of using a MixedInstancesPolicy with LaunchTemplateOverrides, the templates overrides do not inherit from the UserData of the CloudFormationInit.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Set the CfnSignals in all LaunchTemplates of the AutoscalingGroup when a CloudFormationInit is attach.
aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/cfn-init.ts
Line 157 in a3863a6
Current Behavior
The UserData build by the AutoscalingGroup and the Cloudformation does not set the signals on the overrides template, only on the default one.
Reproduction Steps
Create an AutoscalingGroup with a MixedInstancesPolicy with two LaunchTemplates
Attach a CloudFormationInit to the AutoscalingGroup.
On synthetize, all LaunchTemplates need to have the signals generate by the CloudFormationInit
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.123.0
Framework Version
No response
Node.js Version
20.11.1
OS
macos
Language
TypeScript, Java
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: