How to get value of an element from a map based on key in terraform?

You can use terraform lookup() function to get value of an element from a map based on key. lookup() retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead.

Syntax: lookup(map, key, default)

Example:

Leave a Reply