You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/website/docs/language/functions/issensitive.mdx

34 lines
1.5 KiB

---
page_title: issensitive - Functions - Configuration Language
description: The issensitive function true if the value passed is marked as sensitive
---
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
# `issensitive` Function
-> **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](/terraform/language/values/variables#suppressing-values-in-cli-output).
If a value not marked as sensitive is passed the function returns false.
See [`sensitive`](/terraform/language/functions/sensitive), [`nonsensitive`](/terraform/language/functions/nonsensitive), and [sensitive input variables](/terraform/language/values/variables#suppressing-values-in-cli-output) for more information on sensitive values.
## Examples
```
> issensitive(sensitive("secret"))
true
> issensitive("hello")
false
> issensitive(var.my-var-with-sensitive-set-to-true)
true
```