Skip to content
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

[cfn-include] Should treat numbers as valid strings #9784

Closed
skinny85 opened this issue Aug 18, 2020 · 0 comments · Fixed by #9849
Closed

[cfn-include] Should treat numbers as valid strings #9784

skinny85 opened this issue Aug 18, 2020 · 0 comments · Fixed by #9849
Assignees
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 p1

Comments

@skinny85
Copy link
Contributor

skinny85 commented Aug 18, 2020

As it turns out, you can provide a number to a CloudFormation property that expects a string, and it will be converted appropriately.

We should have the same behavior in cloudformation-include.

Probably should only require adding some logic to the getString() function in cfn-parse.ts, plus a unit test of course.

@skinny85 skinny85 self-assigned this Aug 18, 2020
@github-actions github-actions bot added the @aws-cdk/cloudformation-include Issues related to the "CFN include v.20" package label Aug 18, 2020
@skinny85 skinny85 added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Aug 18, 2020
skinny85 added a commit to skinny85/aws-cdk that referenced this issue Aug 20, 2020
CloudFormation allows treating numbers and strings interchangeably.
We previously allowed passing strings as numbers,
but this change allows the conversion in the second direction:
passing numbers as strings.

Fixes aws#9784
@mergify mergify bot closed this as completed in #9849 Aug 20, 2020
mergify bot pushed a commit that referenced this issue Aug 20, 2020
)

CloudFormation allows treating numbers and strings interchangeably.
We previously allowed passing strings as numbers,
but this change allows the conversion in the second direction:
passing numbers as strings.

Fixes #9784

----

*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 p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant