cloudformation-cli
cloudformation-cli copied to clipboard
Duplicate keys not caught by `cfn-cli validate`
We were getting stabilization errors on an AWS::CloudFormation::ResourceVersion
of ours. The schema.json
passed validation and generated correctly via cfn-cli
.
Anyway, here is the diff of the change to our schema.json
that fixed the CloudFormation stabilization issue. I'd expect cfn-cli validate
to have caught this, but it didn't. As you can see there were two Indexes
keys defined in the properties of an object definition.

not surprised CloudFormation doesn't have our own validation for that, but surprised it generated successfully since duplicates keys are not usually valid JSON as far as I know
thanks for raising, will need to look into what library we're parsing JSON with