Terraform = Peace of Mind

thiagocbarreto

Thiago Barreto

Posted on February 13, 2023

Terraform = Peace of Mind

Anyone that have had the pain of setting up infrastructure, specially the same infra multiple times (shout out to all software agencies out there), knows how much of a lifesaver Terraform actually is.

As the go-to infra-as-code solution, Terraform brings peace to an arena filled with stress, worry and doubt. Stop taking hours to set up the same thing over and over, no infra team member having all the company's infra knowledge only on their head, no new colleague having no idea what's the company's infra like.

No more infra being something hard to describe.

Here's how Terraform accomplishes all of this (all screenshots are from their AWS "Get Started"):

1. Resources' Description File

Every infra resource is described as a "resource" block. This one is an EC2 instance resource:

Image description

It could be an S3 bucket, or an RDS instance, or all of them together at the same time!

You could create one resource instance for each deployment stage with a for loop!

And of course, once you have the resource set up correctly, you could have it live in a few seconds/minutes with a single terraform apply command!

Once live, the description file becomes a snapshot for the resource configuration params.

And just like that, your infra code becomes documentation. We can use it as a reference to set up new infrastructure on a new environment!

2. Resources' History

Of course, once something becomes code, it becomes trackable through the use of Git! Just create a repo with all of your resources and start tracking all the changes done to your infra!

💖 💪 🙅 🚩
thiagocbarreto
Thiago Barreto

Posted on February 13, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Terraform Dynamic Blocks 101
devops Terraform Dynamic Blocks 101

September 27, 2024

Terraform For_Each Meta-Argument 101
devops Terraform For_Each Meta-Argument 101

September 25, 2024

Terraform = Peace of Mind
devops Terraform = Peace of Mind

February 13, 2023