-
Story
-
Resolution: Done
-
Minor
-
None
-
None
-
None
current behaviour
If a terraform variable of a CNA module sets its default value to null, the /asset_type endpoint of a module does not show "default: null" in the respective variable metadata.
this problem can be seen on the "aws-rds" module where the instance_class has a default value of null in the module code but /asset_type/aws-rds does not show the default field for the variable.
expected behaviour
the expected behaviour would be that a tf variables default metadata is transported from the module to the /asset_type API endpoint, regardless of it being null or not.
why?
a user of a module needs to be aware what variables are optional and which ones are mandatory. a variable with a default value, regardless of it being null or something else, is optional and all others are mandatory.
alternative solution
alternatively a modules metadata exposed under /asset_type could contain explicit metadata about the variable, e.g. "required: bool"