mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-01-28 03:00:17 -05:00
954 B
954 B
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| functions | sethaselement - Functions - Configuration Language | docs-funcs-collection-sethaselement | The sethaselement function tests whether a given value is in a given set. |
sethaselement Function
-> Note: This page is about Terraform 0.12 and later. For Terraform 0.11 and earlier, see 0.11 Configuration Language: Interpolation Syntax.
The sethaselement function tests whether a given value is in a given set.
sethaselement(set, value)
Examples
> sethaselement(["a", "b"], "b")
true
> sethaselement(["a", "b"], "c")
false
Related Functions
setintersectioncomputes the intersection of multiple sets.setproductcomputes the cartesian product of multiple sets.setunioncomputes the union of multiple sets.