Interview Prep/Terraform/Variables, Locals, Outputs and Types

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.

All Terraform questions Roadmap: Terraform

More on Variables, Locals, Outputs and Types