troposphere icon indicating copy to clipboard operation
troposphere copied to clipboard

Validators method one_of should take in account If condition too

Open mello7tre opened this issue 6 years ago • 0 comments

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.

mello7tre avatar Jul 30 '19 06:07 mello7tre