-
Notifications
You must be signed in to change notification settings - Fork 141
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_tools.dump_yaml strips quotes, causing loaded YAML template invalid #78
Comments
Workaround solution:
Output
|
This is related with the pyYaml and this: yaml/pyyaml#98 But I will work in a workaround to deal with AWS AccountId in the conversion. :-) |
The PR: #79 should fix the issue. |
Thank you for your fix. I think it would be nice when PR is merged to master, we can close the issue. Otherwise the bug is still valid in the the latest branch (master). |
Sure, I've closed too early :-) |
Fixed in #79 :) |
Thanks. It'll be released in the next tag, i.e. after v1.2.0 |
Yes. After the next PR is merged, I'll be releasing as v1.2.1. Hopefully today. |
Description
When parsing YAML files containing string scalar longer than 8 chars and start with 0, the function
cfn_tools.dump_yaml
strips single (and double) quotes, which converts string scalar to number scalar. When CFN templates refers these string values in Ref or Sub functions, it causes template error.Package version: 1.2.0
Test-cases
1. Test case '012345678'
Expected output:
Actual output:
2. Test-case
'01234567'
Output:
The text was updated successfully, but these errors were encountered: