Flattening is Happening
Where for
art thou romeo#
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:
- How
for
works in Terraform - What
flatten
is all about - 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.