Published in


Terraform Count and For_Each Meta-Argument Overview

In this article, I will explain the Terraform count and for_eachmeta-arguments. I will provide examples of how to use each one, when to use them, and when not to use them! Let's jump in!

Photo by ThisisEngineering RAEng on Unsplash

What is count in Terraform?

When you define a resource block in Terraform, by default this specifies one resource that will be created. To manage…




Spacelift is the most flexible platform to enable organizations to orchestrate their IaC. It will help you customize your workflows, automate manual tasks, reduce number of errors, improve security and auditability of your infrastructure.

Recommended from Medium

Alexa Account Linking with Firebase Auth

KAMI-KAMI, Pattern of all Patterns

Data Extraction from GitHub and Auto-run or Schedule Python Script

Making manual form input a tiny bit better

How to learn Technical Analysis

Kubernetes Cluster creation & running Kube hunter in Windows 10

GitLab is down. Oh, not again!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jack Roper

Jack Roper

A tech blog about Cloud and DevOps. Specializing in Azure, Azure DevOps, Terraform & Kubernetes! ☁️

More from Medium

Several tips when using Terraform


Passing variables between Terraform modules using implicit dependency

Format and Mount a VM disk using Terraform in Azure