Thiago Barreto
Posted on February 13, 2023
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:
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!
Posted on February 13, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.