Skip to main content

What is Terraform?

Glossary image

Terraform is an open-source Infrastructure as Code (IaC) tool developed by HashiCorp that allows developers and operations teams to define, provision, and manage cloud infrastructure using a declarative configuration language called HCL (HashiCorp Configuration Language).

Rather than manually clicking through a cloud provider's console or writing imperative scripts that describe how to build infrastructure step by step, Terraform lets you describe what your infrastructure should look like. You write configuration files that specify the desired end state — for example, a virtual machine with a certain amount of memory, connected to a specific network, running in a particular region — and Terraform figures out how to make reality match that description. This approach is known as declarative configuration, and it is central to how modern Infrastructure as Code tools operate.

One of Terraform's most important features is its execution plan. Before making any changes to live infrastructure, Terraform generates a plan that shows exactly what it intends to create, modify, or destroy. This gives teams the opportunity to review changes before they are applied, reducing the risk of accidental disruption. Once approved, the plan is applied and Terraform updates its state file, a record that tracks the current condition of all managed resources. This state file is what allows Terraform to detect drift — situations where the actual infrastructure has diverged from what the configuration describes.

Terraform is cloud-agnostic by design. Through a system of providers, it can manage resources across dozens of platforms, including AWS, Google Cloud, Microsoft Azure, and many third-party services. A provider is essentially a plugin that translates Terraform's configuration language into API calls for a specific platform. This makes Terraform a popular choice for teams working in multi-cloud or hybrid-cloud environments, where a single, consistent tool is preferable to learning each provider's proprietary tooling separately.

In the broader context of DevOps and Infrastructure as Code, Terraform fits into workflows where infrastructure is versioned, reviewed, and deployed with the same rigor as application code. Configuration files can be stored in a version control system like Git, enabling teams to track changes over time, roll back to previous states, and collaborate through pull requests. This makes infrastructure changes auditable and reproducible — qualities that are particularly valuable in environments where cloud hosting costs and reliability are closely managed.

Terraform is often compared to similar tools such as AWS CloudFormation, Pulumi, and Ansible, though each takes a somewhat different approach to infrastructure management. CloudFormation is tightly coupled to AWS, while Pulumi allows infrastructure to be defined in general-purpose programming languages. Terraform's combination of cloud-agnosticism, a large provider ecosystem, and a readable configuration language has made it one of the most widely adopted IaC tools in the industry.

Have a question?

Get in touch if you'd like to learn more about this topic.

Contact Us