How to check if a list contains a certain element in terraform?

You can use terraform contains() function to check if a list contains a certain element. contains() determines whether a given list or set contains a given single value as one of its elements.

Syntax: contains(list, value)

Example:

Leave a Reply