What do `zipmap`, `keys`, `values` and `toset` do?
IntermediateConceptLoops, Conditionals, Dynamic Blocks and Functions
Answer
zipmap(keys_list, values_list) builds a map from two lists. keys(map) and values(map) return sorted keys and the corresponding values. toset(list) removes duplicates and converts to a set, which for_each needs.
More on Loops, Conditionals, Dynamic Blocks and Functions
How does `count` work?BeginnerHow does `for_each` work?BeginnerWhen should you choose `for_each` over `count`?IntermediateHow do you use `for_each` with a list of objects?IntermediateWhat does "The for_each value depends on resource attributes that cannot be determined until apply" mean?AdvancedHow do you create a resource conditionally?Beginner