Terraform
The most widely used infrastructure-as-code tool: declare resources in HCL, review a plan, and apply it through provider plugins.
- What it is
- Infrastructure as code
- Type
- Commercial product
- Made by
- HashiCorp, an IBM company
- License
- Business Source License 1.1 since 1.6 (source-available, not OSI open source); MPL 2.0 before the August 2023 change
- Facts checked
- 5 October 2026
What it is
You describe resources in .tf files written in HCL, HashiCorp’s configuration language. Terraform reads them, builds a dependency graph (the subnet needs the VPC first), and compares the result with its state file, a JSON record of every resource it created and its real ID. terraform plan lists what it will create, change or destroy; terraform apply then calls the cloud APIs, in parallel wherever the graph allows. Each API is reached through a provider plugin, and the Terraform Registry has thousands of them: AWS, Google Cloud, Azure, Kubernetes, GitHub, DNS hosts and many more. That is the main difference from CloudFormation or Bicep: one tool and one workflow across every vendor.
In August 2023 HashiCorp moved Terraform from the open-source MPL 2.0 to the Business Source License 1.1. You can still use it free of charge, in production too; what the licence forbids is building it into a product that competes with HashiCorp, such as a hosted Terraform service. In response, a group of vendors forked the last MPL release as OpenTofu, which stays backward compatible with Terraform and is now a CNCF Sandbox project. IBM completed its acquisition of HashiCorp in February 2025. HCP Terraform is HashiCorp’s hosted service for remote state and runs: free for small teams, with paid editions for larger ones.
Why teams pick it
- One language and workflow for every major cloud and hundreds of SaaS APIs, through providers on the Terraform Registry
terraform planshows exactly what will be created, changed or destroyed before anything is touched- Huge ecosystem of reusable modules, examples and engineers who already know it
- The S3 backend can lock state with a lock file in the bucket (
use_lockfile), so no separate lock table is needed
Watch out for
- The state file is critical and can contain secrets in plain text; it has to live in a remote, locked, access-controlled backend
- Changes made by hand in the console stay invisible until the next plan, and renaming or moving resources needs
movedblocks or state surgery - No longer OSI open source: companies building a competing product need OpenTofu or a commercial agreement
- HCL is declarative; complex logic with
count,for_eachand conditionals gets awkward compared with Pulumi or the AWS CDK - HashiCorp archived CDK for Terraform (CDKTF) in December 2025, so writing Terraform in TypeScript or Python is no longer supported
Alternatives
What all infrastructure as code have in common →
AWS Cloud Development Kit (CDK)AWSDefine AWS infrastructure in TypeScript, Python, Java, C# or Go; the CDK turns it into CloudFormation templates and CloudFormation deploys them.How it fits with other technologies
What Terraform uses
What uses Terraform
- Gois the implementation language ofTerraform
- VMware ESXiis managed via the vSphere provider byTerraform
- HashiCorp Nomadcan have its jobs and ACLs managed byTerraform
- HashiCorp Consulfeeds service changes, via CTS, toTerraform
- CockroachDBcan be provisioned withTerraform
- PlanetScalecan be provisioned withTerraform
- Airbytecan be configured with a provider forTerraform
- Artieis configured as code throughTerraform
- GitHub Actionsruns plans and applies withTerraform
- HashiCorp Packerpasses image IDs through HCP Packer toTerraform
- HCP Waypointprovisions apps through no-code modules inTerraform
- OpenTofuis a fork ofTerraform
- Flociis a local deploy target forTerraform
- LocalStackis a local deploy target forTerraform
- Doppleris managed with a provider byTerraform
- HCP Vault Radarscans workspace variables (beta) inTerraform
- HashiCorp Boundaryis configured as code withTerraform
Remote state on S3 and a VPC with one subnet · hcl
terraform {
backend "s3" {
bucket = "acme-tf-state"
key = "prod/network.tfstate"
region = "eu-west-1"
use_lockfile = true # S3-native state locking
}
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "app" {
vpc_id = aws_vpc.main.id # dependency: the VPC is created first
cidr_block = "10.0.1.0/24"
}See it in a real stack
No architecture uses Terraform yet. Drop it into the playground and wire it up yourself.Open playground →Worth exploring
Where it came from2011–2025
On February 25, 2011, AWS launched CloudFormation, which builds a whole stack of AWS resources from one JSON template, in the right order. The very next day Mitchell Hashimoto blogged that he was impressed by the idea, but that what was really needed was an open-source, cloud-agnostic solution: the same workflow whichever cloud you used. CloudFormation only knew AWS.
Nobody else built it, so three and a half years later Hashimoto’s company, HashiCorp, did. Terraform 0.1 came out on July 28, 2014, supporting only AWS and DigitalOcean. Downloads were mostly flat for the first 18 months, and the team even talked about shutting the project down. Then they began doubling every month, and in 2017 Microsoft became its first major cloud partner.
By version 1.0 in 2021 Terraform had been downloaded more than 100 million times and had over a thousand providers. In August 2023 HashiCorp moved it to the Business Source License, a group of companies forked the last open-source release as OpenTofu, and in February 2025 IBM completed its purchase of HashiCorp.
Why it’s built this way
- Providers as separate plugins
- Being cloud-agnostic meant the core could know nothing about any one API. Each cloud or service gets its own provider plugin, which is how one tool grew from two clouds to thousands of providers.
- Plan first, then apply
- Terraform shows an execution plan of what it will create, change or destroy and acts only on approval, so infrastructure changes can be reviewed like code before anything is touched.
- A state file as the record of what exists
- Mapping each resource in the code to a real ID lets Terraform work out the difference between configuration and reality, at the cost of a file that must be stored, locked and protected.
- HCL instead of JSON or a programming language
- HashiCorp designed HCL as a compromise between a data format like JSON and configuration written in a full language like Ruby: easy for humans to read and write, declarative, with a JSON form for machines.
Timeline
- 2011
Hashimoto calls for an open, cloud-agnostic CloudFormation
- 2014
Terraform 0.1 released in July with AWS and DigitalOcean
- 2017
Microsoft partnership; downloads take off
- 2019
Terraform 0.12 overhauls the configuration language
- 2021
Terraform 1.0, after more than 100 million downloads
- 2023
Relicensed under the BSL in August; OpenTofu fork follows
- 2025
IBM completes its acquisition of HashiCorp in February
- HashiCorp: The story of HashiCorp Terraform with Mitchell Hashimoto
- AWS News Blog: AWS CloudFormation launch (2011)
- HCL README: Why?
- Terraform 0.12.0 changelog
- IBM: IBM completes acquisition of HashiCorp (Feb 2025)
- GitHub: Terraform v0.1.0 tag (July 28, 2014)
- HashiCorp blog: HashiCorp adopts Business Source License (Aug 2023) · archived copy, original
- The OpenTofu Manifesto (2023)
Sources15 · facts checked 5 October 2026
- Terraform docs: What is Terraform?
- Terraform docs: Dependency graph
- Terraform docs: State
- Terraform docs: S3 backend
- Terraform docs: Manage sensitive data
- Terraform docs: Refactoring with moved blocks
- HCP Terraform docs: Overview
- HashiCorp blog: HashiCorp adopts Business Source License (Aug 2023) · archived copy, original
- HashiCorp licensing FAQ
- Terraform LICENSE: BUSL 1.1 for version 1.6.0 and later, with production-use grant
- IBM: IBM completes acquisition of HashiCorp
- The OpenTofu Manifesto (2023)
- OpenTofu FAQ
- CNCF: OpenTofu (Sandbox, accepted April 2025)
- hashicorp/terraform-cdk on GitHub (archived December 2025)