cloudtools / cloudtools/troposphere
Validators method one_of should take in account If condition too
Open
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Valid template where resources property values are "encapsulated" in an `If` condition return validation errors.
As `If` condition for a property value can be used nearly everywhere, should be better to globally change `one_of` method in validators.py to include If condition too.
Ex:
`if properties.get(property) not in conditionals:` should became:
`if properties.get(property) not in conditionals and not isinstance(properties.get(property), If):`
(there is one little problem importing If, we get a circular dep problem, so this solution need a local import or a little refactoring).
Regards, Alberto.
Contributor guide
Assessment
This issue has not been assessed yet.