Terraform is the most popular and widely used Infrastructure as a code tool out there, irrespective of the cloud platform. It has become the synonym for IAC.
All credit goes to Hashicorp people who saw a need to have a single IAC solution for all cloud providers, which is simple to use and doesn’t require a steep learning curve. It was a best fit for the problem in hand, and that is how Terraform became go to solution for most of your IAC needs.
I know its not perfect — Its the best we got, and it will keep getting better.
The same is evident per google trends as well.
What is Terraform?
Terraform is an open-source infrastructure as code (IaC) tool, developed by Hashicorp. Terraform uses declarative language, and HCL (Hashicorp Configuration Language)code to define its resources. You can also use JSON to define resources if you love to make things extra complicated for no reason.
It’s built in Golang (Go), which gives it a lot of power to create different infrastructure pieces in parallel, making it reliable by taking advantage of Go’s strong type-checking and error-handling capabilities.
Few things to know about terraform
- Terraform is Idempotent, meaning you can run the same code multiple times and it will give you the same result.
- It’s repeatable, you can use the same configuration to provide infra for multiple environments(prod, dev, and staging).
- It can be modularized. You can split your configuration into small, independent parts. It supports both, public and private modules.
- Managing dependencies(explicit and implicit dependencies) is a cakewalk in Terraform.
- Terraform is Cloud agnostic, meaning you can use the same configuration files to provision infra in multiple cloud platforms. That doesn’t mean the same line of code can be deployed in any cloud, of course, you need to write different code using specific providers. But the same concepts and syntax can be used with any cloud provider.
How to Ace Hashicorp terraform associate exam in a week?
In recent years Terraform has become a well-known name in the cloud community and Knowing terraform is a primary…medium.com
Why terraform?
J.R.R. Tolkien said it all— One ring to rule them all.
Most organizations these days use multi-cloud and since Terraform is cloud agnostic, we can use the same, simple-to-use, declarative language to write Infra for all cloud providers.
Also terraform is a stateful language and it uses its state to compare the current and desired state of infra and create the only resources required, no more, no less.
And, the most important reason for choosing terraform is due to its simplicity. It’s easy to write and understand and can create resources in parallel with great performance, Thanks to GO.
I will talk more about Terraform in my upcoming posts.
Thanks for reading. Follow me for more content on google cloud, terraform, and Python.
Find me on Linkedin — https://www.linkedin.com/in/akhilesh-mishra-0ab886124/