menu_book Course Curriculum (Terraform) expand_more
HCL Foundations
Expressions
State and Modules
dynamic block
Learn dynamic block in Terraform through a focused explanation, a topic-specific example, an engineering warning, and a mastery check.
12 min read
•
Intermediate
terraform-012.tf
hcl
dynamic "ingress" {
for_each = var.ports
content { from_port=ingress.value to_port=ingress.value protocol="tcp" cidr_blocks=["10.0.0.0/8"] }
}
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content