(autoscaling): applyCloudFormationInit on each launchTemplateOverrides of mixedInstancesPolicy #27030
Labels
@aws-cdk/aws-autoscaling
Related to Amazon EC2 Auto Scaling
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
feature/coverage-gap
Gaps in CloudFormation coverage by L2 constructs
feature-request
A feature should be added or improved.
p1
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the feature
In the Construct autoscaling when setting a CloudFormationInit, the UserData is apply on the LaunchTemplate attach to the ASG.
aws-cdk/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts
Lines 1528 to 1536 in e260d30
In case of usage of a MixedInstancesPolicy with LaunchTemplateOverrides, the overrides do not inherit from the UserData of the CloudFormationInit
Use Case
In case on multiple LaunchTemplate (ARM and x86 as example) the second one does apply the CloudFormationInit?
I do not know how to add the UserData on LaunchTemplateOverrides.
Proposed Solution
add the ability to copy the UserData of the main LaunchTemplate to every LaunchTemplates overrides on a MixedInstancesPolicy
Other Information
If anyone as a workaround solution, i'll be grateful
Acknowledgements
CDK version used
2.93.0
Environment details (OS name and version, etc.)
linux
The text was updated successfully, but these errors were encountered: