Introduction
Sometimes you have lists or maps in your infrastructure code and you need to count items, combine lists, or join maps. Terraform collection functions help you do this easily and correctly.
When you want to count how many servers or resources are in a list.
When you have nested lists and want to make them one simple list.
When you want to combine two or more maps into one map.
When you need to process data from multiple sources into a single collection.
When you want to simplify complex data structures for easier use in your configuration.