troposphere
troposphere copied to clipboard
Boolean values should not be quoted in output
When outputting to YAML or JSON, boolean values should not have quotes around them. An output file will produce E3012 errors when ran through cfn-lint
because of this. See: https://github.com/awslabs/cfn-python-lint/issues/260 for more details on why its not a warning.
Changing the validators.boolean
function to return bool values, rather than strings would correct this issue. I can make a PR for this, but I wanted to discuss any possible repercussions first, since all these types would need to be verified.
this is related https://github.com/cloudtools/troposphere/pull/1136
This is fixed in #1409
@ikben
Is this really fixed with that though? I downloaded the latest version of troposphere but the output json is still using string values for booleans instead of actual booleans:
This was fixed via #1409 with the use of adding the environment variable TROPO_REAL_BOOL=true. It was done this way to preserve backward compatibility for existing stacks and will be the default in troposphere 3.0.
I didn't realize it was implying we need to set that environment variable, and not that troposphere itself set that environment variable. Of course that also made it difficult to find my answer in the documentation since the setting of environment variables are often not shown. Makes sense now.