Skip to content

What Is Terraform?

Terraform is an Infrastructure as Code (IaC) tool developed by HashiCorp. It is distributed under the Business Source License (BUSL). Terraform lets you define, change, and version infrastructure as code.

It provides a way to create immutable infrastructure where configuration drives changes to a desired state.

The Terraform workflow consists of three stages:

img.png

You define resources, which may be across multiple cloud providers and services. For example, you might create a configuration to deploy an application on virtual machines in a Virtual Private Cloud (VPC) network with security groups and a load balancer.

Terraform creates an execution plan describing the infrastructure it will create, update, or destroy based on the existing infrastructure and your configuration.

On approval, Terraform builds a dependency graph of all the resources in your configuration and performs the proposed operations in the correct order, respecting any resource dependencies.

For example, if you update the properties of a VPC and increase the number of Amazon Elastic Compute Cloud (Amazon EC2) instances in that VPC, Terraform will update the VPC before scaling the amount Amazon EC2 deployed.