Terraform vs OpenTofu in 2026: The Fork That Matured
on Terraform, Opentofu, Iac, Devops, Infrastructure
Terraform vs OpenTofu in 2026: The Fork That Matured
When HashiCorp relicensed Terraform from MPL-2.0 to BSL 1.1 in August 2023, it triggered the largest fork in DevOps history. OpenTofu launched under the Linux Foundation with backing from Spacelift, Gruntwork, and dozens of other companies. Nearly three years later, we can actually evaluate how this shook out.
The short version: the fork succeeded. OpenTofu is a legitimate production choice in 2026, not just a protest vote. But the decision is more nuanced than “pick the open source one.”
Photo by Markus Spiske on Unsplash
Where Things Stand: Version Parity
OpenTofu 1.8–1.9 achieved feature parity with Terraform 1.9 and has since pulled ahead in several areas. The two are syntactically compatible for the vast majority of configurations — same HCL, same provider protocol (mostly), same state format.
| Feature | Terraform | OpenTofu |
|---|---|---|
| Provider ecosystem | ~4,000 providers | ~4,000 providers (same registry) |
| State file format | Compatible | Compatible |
| Variable encryption | ❌ | ✅ (1.7+) |
.tofu file extension | N/A | ✅ |
provider_meta for testing | Limited | Enhanced |
| Looping / iteration | Standard | Extended in 1.9 |
| License | BSL 1.1 | MPL 2.0 |
| Commercial support | HashiCorp/IBM | Multiple vendors |
The BSL 1.1 Question
BSL 1.1 is not open source. The key restriction:
“The Software may not be used to provide a Hosted or Embedded Software Service to Third Parties.”
What this means in practice:
- You running Terraform in your CI/CD: ✅ Fine
- HashiCorp/IBM competitors offering Terraform-as-a-service: ❌ Restricted
- Spacelift, Env0, Scalr offering managed Terraform execution: ❌ Technically restricted
If you’re an enterprise with in-house infrastructure teams, the BSL likely doesn’t touch you. If you’re building a platform product that executes Terraform on behalf of customers, you need a lawyer and/or OpenTofu.
What OpenTofu Added That Terraform Didn’t
State and Plan File Encryption (1.7)
The headline feature. Full encryption of state files and plan files using provider-agnostic key management:
terraform {
encryption {
key_provider "pbkdf2" "my_passphrase" {
passphrase = var.state_encryption_key
}
method "aes_gcm" "default" {
keys = key_provider.pbkdf2.my_passphrase
}
state {
method = method.aes_gcm.default
enforced = true # Refuse to read unencrypted state
}
plan {
method = method.aes_gcm.default
}
}
}
Supports PBKDF2 (passphrase), AWS KMS, GCP KMS, and OpenBao (open-source Vault fork). This closes a real compliance gap — Terraform state often contains secrets, and encrypting it at rest was always a workaround requiring external tools.
Looping and Function Enhancements (1.8–1.9)
Provider functions can now be called in more contexts, and the iteration syntax has been extended:
# OpenTofu 1.9: functions in provider configuration
provider "aws" {
region = provider::aws::arn_parse(var.resource_arn).region
}
# Enhanced for_each with complex expressions
resource "aws_iam_role_policy_attachment" "attachments" {
for_each = {
for combo in setproduct(var.roles, var.policies) :
"${combo[0]}-${combo[1]}" => {
role = combo[0]
policy = combo[1]
}
}
role = each.value.role
policy_arn = each.value.policy
}
Improved Test Framework
OpenTofu’s test framework (tofu test) has received more investment than Terraform’s equivalent:
# tests/main.tftest.hcl
run "validates_bucket_naming" {
variables {
bucket_prefix = "test"
environment = "staging"
}
assert {
condition = length(aws_s3_bucket.main.id) <= 63
error_message = "Bucket name exceeds S3 64-char limit"
}
assert {
condition = can(regex("^[a-z0-9-]+$", aws_s3_bucket.main.id))
error_message = "Bucket name contains invalid characters"
}
}
Mock providers for testing without real cloud credentials are more mature in OpenTofu 1.8+.
Where Terraform Still Leads
Terraform Cloud / HCP Terraform
HashiCorp’s managed platform is genuinely well-integrated. If you want hosted state management, policy-as-code (Sentinel), audit logs, and SSO without building anything yourself, HCP Terraform (formerly Terraform Cloud) is still the smoothest experience.
OpenTofu equivalents: Spacelift, Env0, Scalr (all support OpenTofu), but they’re third-party tools that require separate vendor relationships.
Enterprise Support and SLAs
IBM/HashiCorp offers formal enterprise support contracts. OpenTofu support comes from ecosystem vendors (none of which are as large as IBM). For regulated industries requiring vendor SLAs, this matters.
CDK for Terraform (CDKTF)
HashiCorp’s TypeScript/Python/Go SDK for defining Terraform configurations in code. OpenTofu compatibility is partial — CDKTF generates HCL that OpenTofu can consume, but the integration isn’t maintained directly by the OpenTofu project.
Migration: Terraform to OpenTofu
For most configurations, migration is one command:
# Install OpenTofu
brew install opentofu
# In your terraform directory
tofu init # Downloads providers, reads .terraform.lock.hcl
tofu plan # Should show no changes if configuration is compatible
tofu apply # Same state file, same providers
Edge cases to watch:
- Provider version locks — OpenTofu uses the same
registry.terraform.ioprovider registry, but your.terraform.lock.hclreferences terraform-specific registry URLs. Runtofu init -upgradeto re-lock. - Terraform Cloud backend — Migrate to a different state backend (S3 + DynamoDB, Azure Blob, GCS) before switching
- Sentinel policies — Replace with OPA or custom validation scripts
# Check compatibility before migrating
tofu validate # Catches syntax issues
tofu plan -out=plan.bin
tofu show -json plan.bin | jq '.resource_changes | length' # Should be 0
Real-World Usage Patterns in 2026
From observing the community and production setups:
Staying on Terraform:
- Enterprises heavily invested in HCP Terraform with Sentinel policies
- Teams with formal HashiCorp support contracts
- Organizations where “BSL is fine for our use case” holds true
Migrated to OpenTofu:
- Platform engineering teams building internal developer platforms
- ISVs and SaaS companies affected by BSL restrictions
- Open source projects and NGOs
- Teams who just prefer MPL-2.0 on principle
Using both:
- Some organizations run Terraform for existing infrastructure, OpenTofu for new modules/projects
The Ecosystem Question
The most common concern about OpenTofu: “Will providers work?”
Answer: Yes, for everything in the Terraform Registry.
OpenTofu 1.8 introduced its own registry (registry.opentofu.org) that mirrors Terraform’s registry. Any provider published to registry.terraform.io is also available at registry.opentofu.org. The protocol versions are compatible.
# Works in both Terraform and OpenTofu
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
The one gap: providers that use Terraform-proprietary extensions beyond the plugin SDK. Rare, but exists.
Decision Framework
Choose Terraform if:
- You’re using HCP Terraform/Terraform Cloud and value the integrated experience
- You have an active HashiCorp enterprise support contract
- Your use case is clearly within BSL allowances
- You depend on CDKTF heavily
Choose OpenTofu if:
- Your use case could be interpreted as “hosted service” under BSL
- State encryption at rest is a compliance requirement
- You prefer MPL-2.0 for philosophical or legal reasons
- You’re building a product that runs IaC for customers
Either works well for:
- Standard cloud infrastructure management
- Teams that self-manage state backends
- Module development
- CI/CD integration
Conclusion
The Terraform/OpenTofu fork story in 2026 is a success story for open source governance. The Linux Foundation fork moved quickly, maintained compatibility, and added genuine features. Neither choice is wrong.
The days of “OpenTofu is just a protest” are over. It’s a production-grade tool with an active development community and multiple companies investing in its success.
Evaluate based on your actual needs — licensing concerns, feature requirements, tooling investment — not tribal loyalty.
What’s your team using? If you’ve migrated, what was the hardest part? Curious to hear real-world migration stories.
이 글이 도움이 되셨다면 공감 및 광고 클릭을 부탁드립니다 :)
