troposphere
troposphere copied to clipboard
Validators method one_of should take in account If condition too
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.