-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
(CfnInclude): CfnInclude omits aws_autoscaling. UpdatePolicy that dont exists in the CDK (MinActiveInstancesPercent) #33810
Comments
Hi @NetaNir thank you for coming back for the issue report :-) Root CauseYour referenced source is at CDK 2.99.1. Looking at the main branch, the issue is in the AutoScaling UpdatePolicy parsing code in cfn-parse.ts. Here's the affected code: aws-cdk/packages/aws-cdk-lib/core/lib/helpers-internal/cfn-parse.ts Lines 452 to 464 in 7f3cc8f
The
Impact:
Suggested Fix:
I'm making this a p1 and will discuss with the team. |
… in AutoScalingRollingUpdate This commit adds comprehensive testing for the MinActiveInstancesPercent property in AutoScalingRollingUpdate policies: 1. Adds a unit test in cfn-parse.test.ts that verifies: - Correct parsing when MinActiveInstancesPercent is present - Correct handling when MinActiveInstancesPercent is absent 2. Adds an integration test that: - Imports a CloudFormation template with MinActiveInstancesPercent - Verifies the template can be successfully deployed These tests ensure that the fix for issue aws#33810 correctly handles both cases - when the property is present and when it's absent in the template.
Describe the bug
When CfnInclude references a template that has an UpdatePolicy for autoscaling groups it silently omits the MinActiveInstancesPercent property because the code in cfn-parse.ts does not include the property:
The result is that the property is omitted completely and silently :(
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
MinActiveInstancesPercent should be included in the output template
Current Behavior
The result is that the property is omitted completely and silently :(
Reproduction Steps
Create a CFN template with an autoscaling group and an update policy which includes MinActiveInstancesPercent, reference the template file using
CfnInclude
, theMinActiveInstancesPercent
will not exist in the template in cdk.outPossible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.1003.0
Framework Version
2.132.0
Node.js Version
18
OS
MacOs
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: