DEV Community

Vidyasagar SC Machupalli
Vidyasagar SC Machupalli

Posted on

Terraform unsensitive

For every sensitive=true in Terraform, there is a nonsensitive function...

variable "password" {
   type        = string
   description = "Password"
   sensitive  = true
}
Enter fullscreen mode Exit fullscreen mode

nonsensitive takes a sensitive value and returns a copy of that value with the sensitive marking removed, thereby exposing the sensitive value.

output "sensitive_password" {
  value = nonsensitive(var.password)
}
Enter fullscreen mode Exit fullscreen mode

The nonsensitive function removes the sensitive marking from a value that Terraform considers to be sensitive.

Note: The nosensitive function is only available in #Terraform v0.14 and later.

Top comments (0)