In this video, we'll cover Terraform looping constructs. Terraform is declarative, so it's looping structure may seem weird to those used to procedural programming loops. There are a few ways to performing looping with Terraform. We'll cover the looping constructs that specifically work at the resource level. They handle resource creation itself. There are two of them.
- count: This is often brought up when talking about looping with Terraform.
- for_each: This technique is similar to the count method but has some advantages. It should be generally used over count. We'll explain why in this video.
Links:
Terraform HCL Fundamentals
1h 53m
Explore lesson as part of a learning path
Get full access to these great resources
All for less than the price of coffee a day