Photo by Wajih Ghali on Unsplash

5 things I love about Terraform

I would like to show my favorite things I love about the Terraform to help you in your IaC journey using this tool.

DevOps from Zero!💻
4 min readJun 12, 2023

--

Hi everyone! Backing to the Medium I would like to share in this post somethings related to Terraform that I think fantastic for everyone who intends to one day start using. Before to proceed, is nice to explain how Terraform works and some links about the Terraform. I hope you enjoy this post and I am listening for more improvements, questions and appreciations. Certainly this amazing tool have changed the IaC mindset into the IT industry enabling things we could never imagine in how to create and maintain infrastructures.

How it works

Terraform is one of the very popular IaC (Infrastructure as Code) tool, is one of the products of HashiCorp, today it is one of the most famous companies that provide products used by the DevOps community, where it has the tools, Vagrant, Packer, Terraform, Vault, Nomad and Consul., an open-source software company based in San Francisco, California. Basically, Terraform lets you define the infrastructure for a variety of vendors. For example: AWS, Azure, GCP, Digital Ocean and OpenStack, etc.

Hashicorp Terraform

Medium posts about Terraform

Make sure you have tested my Medium articles to read and learn a lot about the Terraform, I am IaC fanatic and often I post about the Hashicorp products into the Medium, GitHub or Substack.

5 things I love about Terraform

Now check below the 5 things I really appreciate about this tool. :)

5 commands to get started

That’s really and amazing tool, using 4 commands you can create and provision your infrastructure as code for any cloud provider, like AWS, Azure, GCP and others providers.

  • $ terraform init
  • $ terraform validate
  • $ terraform plan
  • $ terraform apply
  • $ terraform destroy

Using those commands you can provision a basic example on AWS cloud like an EC2, VPC or other service, but always check the Terraform documentation to make sure you have created the correct files and resources.

The state file

This is the most important feature inside the Terraform. It keeps track of the resources you’ve provisioned and their current configuration. The state file is crucial for Terraform to plan and manage changes to your infrastructure. The file name is terraform.tfstate and this can be versioned and a good practice is create a backend state file. You can use the command $ terraform state for advanced state management.

Multi-Cloud Platform

Terraform is cloud-agnostic and supports multiple cloud providers, including AWS, Azure, Google Cloud Platform, and more providers. This allows you to define your infrastructure in a consistent manner across different cloud environments, making it easier to adopt a multi-cloud or hybrid cloud strategy. Terraform lets you use the same workflow (tf. files) to manage multiple providers. This helps to manage the complexity across the providers in a way that avoid to do some mistakes while creating the code.

The IT market adoption

The Terraform has become the leading IaC (Infrastructure as Code) tool in the technology market and by the community, if you keep a basic search into the web, certainly you will find several articles, use-cases, courses and videos about this tool. This increase adoption by the community have helped the newbies like me, to get started, learning and sharing Terraform features.

Import feature

Terraform can import existing infrastructure resources in several providers, you only need code the configuration file before to proceed, so the Terraform will match with the resource block and initialize correctly. The resource block describes where Terraform should map the imported object. The terraform import command is the responsible to import the resource into IaC mode, it’s fantastic. 🚀

And that’s all folks. If you liked this story, please show your support by 👏 this story. Thank you for reading!

--

--

DevOps from Zero!💻

SRE/DevOps Engineer| Lifelong learner | Medium Creator | AWS/Azure certified☁️ | Hashicorp Ambassador | Containers | Tech | Community | Coffee