Introduction to Terraform

We have decided at Deployflow to spend the month of June on helping you understand better the Terraform and how it can improve your organisations’ workflow.

Terraform is a tool for provisioning, building, managing, changing and versioning your infrastructure using the code. The beauty of this approach is that you can use your code repository, and benefits of it like access control and version control to control, manage and grow your solution.

Because Terraform is created by company Hashicorp, an independent vendor they benefit from the ability to link it to many different platforms. You can create your Terraform code for Azure, AWS, Google, VMware and many more, you can see the list of the platform the code work with here: https://www.terraform.io/docs/providers/index.html. There is constant development of new providers so that list is going to continue to grow with time, and as it’s a platform that is not linked to a specific cloud provider or vendor, there is going to be long term support.

One of the interesting feature of Terraform, is that it’s capable to manage your Infrastructure-as-a-Service, Platform-as-a-Service and Software-as-a-Service – basically, any service that has API with lifecycle associated with it Terraform can be used to manage. Allowing you to have unified management of the platforms that are used to deliver your solution.

Currently, on the market, we do not see any clear competitor to Terraform in terms of the overall capabilities. There are solutions like AWS CloudFormation, but they are linked to one specific vendor preventing you from easily deploying to another vendor. We do have as well platform like Puppet and Ansible, but they do apply more to an already deployed infrastructure and lack the level of abstraction on the environment to manage it efficiently.

Terraform allows you to easily evolve your infrastructure as you grow your solution. The Terraform code is human readable allowing you to easily understand what is happening.

Terraform deployment is split into three steps:

  • Refresh – this connects to your provider, and checks what is out there, how is it configured and what is in place.
  • Plan – this compares what the environment should be based on the configuration files vs what is within the environment already, and then determine how to get to that state.
  • Apply – this goes ahead and implement the changes that have been determined in the plan step, the Terraform code is capable of understanding the dependencies between resources, allowing you to make sure you create the right items in the right order.

Upon the execution of those steps, all the changes and details are stored into the state file, that is used to keep details of how and what has been configured to check against the refresh step. And it allows Terraform to destroy any resource that has been created if you have removed it from the code, making sure that the environment remains clean.

At Deployflow we invest a lot of time and effort into delivering projects to our clients using Terraform, as we have found this to be a very flexible platform allowing us to improve the delivery of customers solutions

In the next post, we will look into creating the Terraform code and explaining the Terraform structure.

If you would like to discuss your requirements or maybe you would like to find out how Deployflow could help your organisation, please do get in touch!

Share

Share on linkedin
Share on twitter
Share on facebook

Leave a Comment

Your email address will not be published. Required fields are marked *

TOP ON INSIGHTS

DevOps best practices

Here at Deployflow, we pride ourselves on keeping up with best practices and industry changes when it comes to applying DevSecOps, which is why we

Read More »

Basics of Terraform

So following from our last week post we would like to introduce you to basics in Terraform. Part of your DevOps research you will be

Read More »
Scroll to Top