Terraform
issensitive Function
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
[!IMPORTANT]
Documentation Update: Product documentation previously located in/website
has moved to thehashicorp/web-unified-docs
repository, where all product documentation is now centralized. Please make contributions directly toweb-unified-docs
, since changes to/website
in this repository will not appear on developer.hashicorp.com. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
Note: This function is only available in Terraform v1.8 and later.
issensitive
takes any value and returns true if Terraform
treats it as sensitive, with the same meaning and behavior as for
sensitive input variables.
If a value not marked as sensitive is passed the function returns false.
See sensitive
, nonsensitive
, and sensitive input variables for more information on sensitive values.
Examples
> issensitive(sensitive("secret"))
true
> issensitive("hello")
false
> issensitive(var.my-var-with-sensitive-set-to-true)
true