terraform for_each

Building Dynamic Outputs with Terraform Expressions and Functions

We know we can define a Terraform module that produces output for another module to use as input. But how can we build dynamic output from a module that creates a set resources, and format that output just right to act as input elsewhere? It's possible with the…