Unable to enforce string on input
See original GitHub issue
self.template.add_resource(VPCPeeringConnection(
title,
VpcId=peering_config['VpcId'],
PeerVpcId=peering_config['TargetVpcId'],
PeerOwnerId=peering_config['TargetAccountId'],
PeerRoleArn=peering_config['TargetRoleArn'],
Tags=Tags(
Name=title
)
))
as account ID is 1234567890 format. the Account ID keep written as Number instead of String. this cause cloudformation complain about the value
[2018-03-05 16:36:47] - sceptre.stack - 2018-03-05T03:36:47+00:00 prod/cross-account-vpc-peering ProdVpcToDev AWS::EC2::VPCPeeringConnection CREATE_FAILED Invalid value '1.234567890E10' for peerOwnerId.
even if i use str() to convert it. it still written as number in yaml output
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
HTML input type="number" still returning a string when ...
When you set input type="number" then these input field don't accept non numeric input but at the same time it doesn't make the...
Read more >Input String Was Not in a Correct Format: Easy Fixes
Input string was not in a correct format warning mainly occurs when you try to convert a non-numeric string into an int. Read...
Read more >Input string was not in a correct format error when importing ...
When you import a solution in Microsoft Dynamics 365, you receive an error that states input string was not in a correct format...
Read more >Error handling in Step Functions - AWS Documentation
The Amazon States Language defines a set of built-in strings that name ... Step Functions failed to apply a state's ResultPath field to...
Read more >Error: “Input string was not in a correct format”
If you are unable to start the Alteryx Service on a node that isnot the Controller, see Solution B. Had there been any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I’ve been looking into this issue for a while and I think the issue might actually lie with CloudFormation but probably for a good reason.
Take, for example, the sequence:
012345678
. The yaml spec (v1.1, it’s fixed in v1.2) says that octal numbers start with a0
. But this sequence isn’t valid octal because it contains8
so most yaml parsers interpret this as a string. CloudFormation does not and (possible incorrectly) tries to interpret it as a number. This is wrong from the point of view of the yaml spec but probably correct from a safety point of view.Fixing this in cfn-flip is going to be interesting but I’ll continue to look into it.
If you have any ideas, please submit a PR 😄
Ok. Fixed in
cfn-flip>=1.0.2
😃PR here: https://github.com/cloudtools/troposphere/pull/1003