forked from hashicorp/terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This function can be used to check if a value is marked as sensitive or not within terraform. Closes hashicorp#34572
- Loading branch information
1 parent
30aa3cb
commit 473da98
Showing
7 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
page_title: issensitive - Functions - Configuration Language | ||
description: The issensitive function true if the value passed is marked as sensitive | ||
--- | ||
|
||
# `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 | ||
> sensitive(var.my-var-with-sensitive-set-to-true) | ||
true | ||
``` |