forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cfn-include): NestedStack's Parameters are not converted to strin…
…gs (aws#15098) When we include a NestedStack when creating a CfnInclude instance, the conversion of the Parameters property of the AWS::CloudFormation::Stack resource is performed manually (because of the eventuality that one of those Parameters was also requested to be removed when including the nested stack). In that manual conversion, we did not correctly convert the values to strings, which is what the underlying CfnStack class expects. And so, if the parent stack passed a non-string primitive value to a nested stack Parameter, like a number or boolean, including the nested stack would fail with a validation exception. Fixes aws#15092 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
5 changed files
with
98 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
9 changes: 9 additions & 0 deletions
9
...ws-cdk/cloudformation-include/test/test-templates/nested/child-with-number-parameter.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Parameters: | ||
Number: | ||
Type: Number | ||
Resources: | ||
S3Bucket: | ||
Type: AWS::S3::Bucket | ||
Properties: | ||
BucketName: 'testbucket1234unique' |
8 changes: 8 additions & 0 deletions
8
...-cdk/cloudformation-include/test/test-templates/nested/parent-number-in-child-params.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Resources: | ||
NestedStack: | ||
Type: AWS::CloudFormation::Stack | ||
Properties: | ||
TemplateURL: 'https://s3.amazonaws.com/masonme-cdk-test/templates/nested-bucket.yaml' | ||
Parameters: | ||
Number: 60 |
This file contains 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