How does sensitivity propagate, and what is `nonsensitive()`?
AdvancedConceptVariables, Locals, Outputs and Types
Answer
Any expression using a sensitive value yields a sensitive result, and if an output references one it must itself be sensitive = true or Terraform errors. nonsensitive(value) strips the mark when you are sure the value is safe, for example a derived hash. Use it sparingly: it makes the value visible in logs.
More on Variables, Locals, Outputs and Types
How do you declare an input variable?BeginnerIn what order does Terraform load variable values?BeginnerHow do you define an output and what is it for?BeginnerWhat is the difference between locals and variables?BeginnerWhat are the primitive types in Terraform?BeginnerHow do list, set and map differ?Intermediate