Using Dynamic Blocks in Terraform
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

No More Secrets in State! Write-Only Args in Terraform 1.11 | Terraform Tuesday

Parsing Data with For Loops

Using the Terraform Test Framework

Terraform Basics: Input Variables

Using Moved Blocks in Terraform

Dynamic Blocks in Terraform with Azure

Getting Started with GCP and Terraform

Complete Terraform Course - From BEGINNER to PRO! (Learn Infrastructure as Code)

Exploring the Import Block in Terraform 1.5

Terraform Basics: Output Values

Terraform Basics: Local Values

How To Structure Terraform Project (3 Levels)

Understanding Private Endpoints in Azure | VM, VNet, Service Endpoint, and Storage Account Demo

Choosing Between Count and For-Each

Exploring Ephemeral Resources | Terraform Tuesdays

Using Terraform with Azure

Using templatefile in Terraform

Terraform with Multiple State Files

What are Terraform Dynamic blocks? - Part 8

