-
Notifications
You must be signed in to change notification settings - Fork 4k
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): Nested stack parameters must be strings #15092
Labels
@aws-cdk/cloudformation-include
Issues related to the "CFN include v.20" package
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Comments
MasonHM
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 11, 2021
Thanks for reporting @MasonHM, confirming I was able to reproduce the error. Working on a fix. |
skinny85
added
@aws-cdk/cloudformation-include
Issues related to the "CFN include v.20" package
effort/small
Small work item – less than a day of effort
p2
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 11, 2021
skinny85
added a commit
to skinny85/aws-cdk
that referenced
this issue
Jun 11, 2021
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
skinny85
added a commit
to skinny85/aws-cdk
that referenced
this issue
Jun 14, 2021
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
MasonHM
changed the title
(CfnInclude): Nested stack parameters can't be Number
(CfnInclude): Nested stack parameters must be strings
Jun 14, 2021
mergify bot
pushed a commit
that referenced
this issue
Jun 14, 2021
…gs (#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 #15092 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
hollanddd
pushed a commit
to hollanddd/aws-cdk
that referenced
this issue
Aug 26, 2021
…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*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/cloudformation-include
Issues related to the "CFN include v.20" package
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
When using the CfnInclude module to import a nested stack with a 'Number' parameter and the parent stack provides an unquoted number, CDK throws an error saying:
Changing the parameter to a quoted string (
60
-->'60'
) in the parent template fixes the problem. In my case, this would mean changing the parameter format in dozens of locations, so I'd rather have CDK support number parameters the way I expect.CloudFormation documentation says:
This problem may be related to #744.
Reproduction Steps
parent-stack.yaml
:nested-stack.yaml
:bin/min-repro-int-param.ts
:What did you expect to happen?
I expected
cdk synth
to work correctly and generate the CloudFormation.Expected output:
What actually happened?
cdk synth
exited with an error.Actual output:
Environment
Other
This may be related to #744, but I'm not sure.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: