Introduction to Terraform

Sumudu Nissanka
2 min readNov 24, 2018
figure 1

Hi my friends ,

welcome to my first article, Are you a novice to Infrastructure as code? If yes, This is for you. :)

Well, let’s move to have a brief idea about what infrastructure as code [Iac] is. Assume you have a datacenter underlying hardware and software which are dynamically changing. You should have the ability to be leverage which can allocate resources in line. It is a problem when you are going to handle the hundreds of datacenters. Infrastructure as code is one of answer for that. Iac enables us to manages and configure out the physical and virtual machine in programmatically in single place.

Now, look at what Terraform is.

Terraform is one of Infrastructure as code tool. It is an open source and written in go language by HashiCorp. The first release did on 28th of July, 2014. Once in two weeks, they make a release. A lot of organizations are using terraform as their infrastructure as code tool.

Why do you need to use Terraform?

  • Terraform provides a high-level description of the infrastructure
  • Terraform modules allows the user for composition and combination. It is reusable, easy to use and provides easy way to abstract common blocks of configuration.
  • Terraform supports parallel management of resources.
  • Terraform supports the modern datacenter(elastic, DNS and CDN that require across potentially disparate vendor platforms). Terraform tool is created with the requirements for building, combining and launching infrastructure efficiently.
  • It enables you to satisfy and predictable infrastructure as code. It manages anything with APIs into declarative configuration files.

Key features of Terraform

Infrastructure as Code: Terraform gives high-level configurations infrastructure that can be shared and reused. Integrate with application code workflow(git). Human-readable configuration is designed for human consumption so user can quickly interpret and understand their infrastructure configuration.

Execution plans : Terraform has a “planning” step. It shows what Terraform will do when you call apply. You can save plans to guarantee what will happen. This allows you to know the reason for certain action.

Resource graph: Terraform builds a graph of all your resources. It parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.

Change Automation: complex change-sets can apply to infrastructure by giving minimum effort of human interaction.

In here I briefly explained the main idea about Terraform and why we should select this as our infrastructure as code tool. I believe you might have some basic idea about Terraform and I hope to share my personal experience with Terraform in the future posts. :) :)

--

--

Sumudu Nissanka

Software Engineer @wso2 | Graduate @University of Colombo School of Computing | Former DevOps intern @wso2