How to structure Terraform code

How to structure Terraform code

Infrastructure as code is awesome. Nowadays, it’s so quick to set up that even for smaller projects I tend to use it as it saves me headaches later on.

Hashicorp’s Terraform is one of the main tools for infrastructure as code. Terraform itself does not specify a specific folder structure. Many engineers are thus confused on how to structure their terraform code.

The short answer is that there’s no silver bullet as it strongly depends on factors such as the project and organization size and structure.

I recommend to watch the following video which gives some possible ways to structure your terraform code with their pros and cons:

How do you structure your terraform code?

Do you use other IaC tools such as Pulumi or Terragrunt for this reason?

Related Posts

I’ve built an AI-powered Psychotherapist Assistant!
I’ve built an AI-powered Psychotherapist Assistant!
Read Post
Anti Hype LLM Reading List
Anti Hype LLM Reading List
Read Post
How to Quickly Build AI & Data Apps
How to Quickly Build AI & Data Apps
Read Post