Skip to main content
  1. blog/

Flattening is Happening

Where for art thou romeo
#

Scrolling code thumbnail

In this series, I’ll break down a more obvious version of the sample usage for flatten included in the HCL documentation, expanding each concept into chunks you can understand without a ton of trial and error.

We’ll break this up into three parts:

  1. How for works in Terraform
  2. What flatten is all about
  3. Some real life use cases: AWS security group rules, and GCP IAM role membership

Now that we have a plan, let’s get started!


Documentation
#

Part 1: Nested `for` statements and you
8 mins
Terraform Data Structures Iac
Let’s break down how ‘for’ actually works in Terraform.