cfn-lint
cfn-lint copied to clipboard
Validation on properties of a parameter
An invalid property on a parameter doesn't seem to trigger an error (there's a typo in the Default
key):
Parameters:
MyPassword:
Description: Password
Type: String
Defaut: hunter2
NoEcho: True
This parameter was used in some UserData via Fn::Sub
.
Thanks @aarongorka
This is still an issue in v1.3.4.
Two approaches -
- hand-write custom validation code for Parameters (also Outputs and Metadata and probably others) (not actually that awful, it would be quite small and probably reusable between all of these sections)
- write a json schema for these sections, add a runtime dependency on jsonschema, and run jsonschema validation at validation time.
I am actually tending towards the first, but I wouldn't have a huge opinion either way.