Using Dynamic Blocks in Terraform

By Published On: February 9, 2021

Some resources in Terraform can have multiple instances of the same nested block. For instance, the virtual network in Azure or the tags in an AWS auto-scale group. Instead of creating each block by hand, you can use dynamic blocks and a for_each argument. I don’t love the solution for reasons I discuss in the video, but I’m a pragmatist at heart. Sometimes good enough is good enough.

SHARE THIS VIDEO