Terraform
contains 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. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
contains
determines whether the list, tuple, or set given in its first
argument contains at least one element that is equal to the value in the second
argument, using the same definition of equality as the ==
operator described in
Equality Operators.
contains(list, value)
Examples
> contains(["a", "b", "c"], "a")
true
> contains(["a", "b", "c"], "d")
false