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.
GitHub Repo: https://github.com/ned1313/terraform-...
Daily Check-In Podcast: https://anchor.fm/ned-bellavance
Terraform Certification Guide: https://leanpub.com/terraform-certified/
-----------------------------------------------------------------------------------------------------
Patreon: / nedinthecloud
Website: https://nedinthecloud.com
Pluralsight: https://app.pluralsight.com/profile/a...
GitHub: https://github.com/ned1313
Music by Evan Williams ©2020
Intro 0:00
What are dynamic blocks? 2:38
Normal Form with Data 3:36
Dynamic Block Syntax 7:13
Azure Example with Dynamic Blocks 9:09
Different Data Types for Dynamic Blocks 14:47
Azure Example without Dynamic Blocks 17:00
Outro 20:30