terraform/website/docs/configuration/functions/sethaselement.html.md

761 B

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

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
  • setintersection computes the intersection of multiple sets.
  • setproduct computes the cartesian product of multiple sets.
  • setunion computes the union of multiple sets.