Open source fork of Terraform maintained by the Linux Foundation. Compatible with HCL and Terraform providers, created in response to HashiCorp's license change to BSL 1.1.
OpenTofu is a fork of Terraform created in September 2023 when HashiCorp changed Terraform's license from MPL 2.0 (open source) to BSL 1.1 (source-available, with commercial restrictions). The Linux Foundation adopted the project to ensure a truly open source alternative existed.
Terraform's BSL 1.1 license allows using, copying, and modifying the code, but prohibits offering a competitive product based on it. This affects:
For end users who only use Terraform internally, the practical impact is minimal.
OpenTofu maintains compatibility with the Terraform ecosystem:
# Basic migration
# 1. Install OpenTofu
brew install opentofu
# 2. Replace commands (drop-in replacement)
tofu init # instead of terraform init
tofu plan # instead of terraform plan
tofu apply # instead of terraform apply
# 3. State file is compatible
# No state migration required.tf files in HCL — 100% compatibleOpenTofu has started adding its own features:
Choose OpenTofu when:
Stay with Terraform when:
| Aspect | Terraform | OpenTofu |
|---|---|---|
| License | BSL 1.1 | MPL 2.0 (open source) |
| Governance | HashiCorp | Linux Foundation |
| CLI | terraform | tofu |
| HCL compatible | Yes | Yes |
| Providers | Terraform Registry | Compatible + own registry |
| State encryption | Enterprise only | Included (free) |
| Commercial support | HashiCorp | Spacelift, env0, Scalr |
| Community | Established | Growing |
# main.tf — works the same in Terraform and OpenTofu
terraform {
required_version = ">= 1.6.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
backend "s3" {
bucket = "my-state-bucket"
key = "prod/terraform.tfstate"
region = "us-east-1"
}
}
provider "aws" {
region = "us-east-1"
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "5.5.0"
name = "production"
cidr = "10.0.0.0/16"
}# OpenTofu only
terraform {
encryption {
key_provider "pbkdf2" "main" {
passphrase = var.state_passphrase
}
method "aes_gcm" "main" {
keys = key_provider.pbkdf2.main
}
state {
method = method.aes_gcm.main
}
}
}Companies backing OpenTofu:
Terraform's license change to BSL was a turning point for the IaC ecosystem. OpenTofu ensures that investment in HCL knowledge and existing modules is not locked behind a restrictive license. For organizations that value open source as a principle, not just a convenience, OpenTofu is the viable alternative.
HashiCorp's Infrastructure as Code tool that enables defining, provisioning, and managing multi-cloud infrastructure through declarative HCL files.
Practice of defining and managing infrastructure through versioned configuration files instead of manual processes. Foundation of modern operations automation.
Set of technical and cultural practices that implement DevOps principles — from Infrastructure as Code to blameless post-mortems. The "how" behind the philosophy.