Tuesday, December 13, 2016

My Guide to terraform.

What is terraform

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. - Terraform start guide.

Well, this briefly explains what it capable of. So let's look at some of the key goals of Terraform as per the author of this nice technology.


  • Unify the view of resources using infrastructure as a code.
  • It's all about writing some code to model your infrastructure. You specify the resource on code snippet and describe it and hand over to Terraform to create it. The beauty of modeling an infrastructure as a code is, it brings all other advantages we got from a source code.Simply we can keep them on a repository, version them, review them, integrate with a CI/CD pipeline, automate the tests on infrastructure.

  • Support the modern data center ( IaaS, PaaS, SaaS )
  • It's capable of handling any of the above, as an example

    • IaaS --> EC2 is an infrastructure as a service by the AWS.
    • PaaS --> AWS OpsWork.
    • SaaS --> RDS.
    Terraform can integrate with any on those services.

  • Expose a way to safely and predictably change the infrastructure.
  • With Terraform you don't need to go and create the infrastructure. You can predict the infrastructure by dry running or here we called it plan. It gives you a report on your infrastructure and how it will be once you execute the script.Then you can review the changes and safely build or upgrade the infrastructure without affecting to any of existing.

  • Provide a workflow that is technology agnostic.
  • You don't have to bound to any specific provider. You can instantiate an ec2 which is AWS and you can use some other platform to create a database.


If you already playing with the infrastructures you should have plenty of questions on Terraform because you have played with other technologies which sound similar to Terraform.

It's not Chef or Puppet, both of them are cool technologies where we use to install and manage software on a hosts in other words they are managing configurations but Terraform is not.But you can use any of those configuration management technologies along with Terraform to configure the infrastructure which created with it.

CloudFormation, yes it has some similarities. Terraform inspired by the problem they solved the problem of modeling infrastructure as a code. But it is limited to a specific provider, you can't create a hybrid infrastructure with CloudFormation.

SDK like python boto empowered developers to access cloud providers in a programmatic way but terraform is not used for pragmatic access to cloud its simple infrastructure modeling in a human friendly way.

I think this is enough for a single blog post will meet you soon with another blog post with my hands on experience with terraform.

No comments:

Post a Comment