Skip to content

What it is

Terraform is an open-source tool by HashiCorp that reads declarative HCL configuration, plans the changes needed to reach the described state, and applies them through provider APIs.

Terraform is an infrastructure-as-code (IaC) tool: engineers describe the desired end state of cloud resources in configuration files, and Terraform makes the real world match. The configuration is written in HCL (HashiCorp Configuration Language), a declarative syntax designed for readability. The tool compares that description against a state file that records what it believes exists, computes a plan of the changes needed to reconcile the two, and applies the plan by calling the APIs of the underlying cloud providers — AWS, Azure, Google Cloud, Kubernetes, Cloudflare, dozens of SaaS platforms.

The critical distinction from configuration management tools (Ansible, Chef, Puppet) is that Terraform is declarative and infrastructure-focused. Ansible describes steps to run on a host; Terraform describes resources that should exist in a cloud. When you run Terraform, it does not execute a script: it figures out which resource API calls are needed to close the gap between declared and actual state, and executes them. That model is what makes Terraform idempotent: applying the same configuration twice produces no change the second time.