Terraform HCL Loops With count and for_each

Terraform HCL Loops With count and for_each

July 9, 2021
Tags:
terraform

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.

  1. count: This is often brought up when talking about looping with Terraform.
  2. 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:

Get full access to these great resources

All for less than the price of coffee a day

44 courses
286 lessons
46+ hours

Get started with BoltOps Learn now and get access to easy and powerful lessons

BoltOps Tools