You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are cases when external analysis of a Terraform variable declaration needs to understand whether the variable in question is something that can contain sensitive secret or not. With the current set of attributes, this is not something that can be deduced.
For an example, there can be a tool (or a future Terraform feature) that analyzes a given module and outputs the list of variables with their descriptions, types, default values, and their sensitive nature.
Attempted Solutions
I attempted to just add a sensitive = true attribute, however this fails at terraform validate level, because that's an unrecognized key.
Proposal
IMO this can be addressed with two approaches.
Let go of the unrecognized key validation for variables. This will allow developers to declare their own attributes to be used by tools other than Terraform.
Add a new attribute sensitive (with a meaning similar to that of the outputs) with possible values "true" or "false". (I understand that may also require a new type boolean which opens up justification for other feature requests such as if conditions)
Defining input variables as sensitive in order to redact the values from UI output is now available in 0.14! A recent blog post has more information on this feature, and I'll be closing this one as a result!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked as resolved and limited conversation to collaborators
Jan 2, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Terraform Version
Use-cases
There are cases when external analysis of a Terraform
variable
declaration needs to understand whether the variable in question is something that can contain sensitive secret or not. With the current set of attributes, this is not something that can be deduced.For an example, there can be a tool (or a future Terraform feature) that analyzes a given module and outputs the list of variables with their descriptions, types, default values, and their sensitive nature.
Attempted Solutions
I attempted to just add a
sensitive = true
attribute, however this fails atterraform validate
level, because that's an unrecognized key.Proposal
IMO this can be addressed with two approaches.
Let go of the unrecognized key validation for variables. This will allow developers to declare their own attributes to be used by tools other than Terraform.
Add a new attribute
sensitive
(with a meaning similar to that of the outputs) with possible values "true" or "false". (I understand that may also require a new typeboolean
which opens up justification for other feature requests such asif
conditions)References
#18691
The text was updated successfully, but these errors were encountered: