sensitive value

A variable or output marked sensitive = true, which Terraform hides in plan output and the terminal but still stores in state in plain text.

In more detail

Anything built from a sensitive value is also sensitive, and an output that uses one must be marked sensitive or the plan fails. terraform output -raw and -json still print the real value on purpose. Sensitive protects the terminal, never the state file.

Examples

Reading sensitive_attributes from terraform.tfstate finds every secret stored inside
output "admin_password" {
  value     = random_password.admin.result
  sensitive = true
}

Related terms

Related guides

Taught in

References

Certification courses