OpenTofu: The Open Terraform Fork

Khimananda Oli 4 min read Virtualization
OpenTofu: The Open Terraform Fork

By Khimananda Oli | Last reviewed: August 2026

When HashiCorp changed Terraform’s license to the Business Source License (BSL) in late 2023, many organizations realized their infrastructure-as-code dependency was no longer truly open source. OpenTofu: The Open Terraform Fork emerged as the direct response, preserving the original MPL 2.0 license and community governance model that enterprises relied on for compliance and freedom. If you are evaluating whether to stay with Terraform or adopt its fork, understanding the practical differences in state management, provider ecosystems, and long-term viability is essential before making any production changes.

TerraformMPL 2.0 EraLicense ChangeBSL v1.1 (Aug 2023)Terraform (HashiCorp)Commercial / BSLOpenTofu ForkTrue MPL 2.0 OSS
OpenTofu: The Open Terraform Fork diverged from Terraform following the BSL license change to preserve open-source infrastructure automation.

What exactly is OpenTofu: The Open Terraform Fork?

OpenTofu is a fork of Terraform 1.5.x created under the Linux Foundation to guarantee perpetual open-source licensing. Unlike a simple copy, it has evolved into an independent project with its own release cadence, feature roadmap, and governance structure. For DevOps engineers and platform teams, the critical distinction is legal and operational: OpenTofu remains under the Mozilla Public License 2.0, meaning you can use, modify, and distribute it commercially without the usage restrictions imposed by the BSL.

In practice, this matters most for managed service providers, SaaS platforms embedding IaC, and organizations with strict compliance requirements that prohibit BSL-licensed tooling. The fork maintains full backward compatibility with existing Terraform state files and HCL configurations up to version 1.5, allowing teams to evaluate the transition without rewriting infrastructure definitions. As of mid-2026, OpenTofu has stabilized its own provider registry and introduced features like client-side encryption for state backends that Terraform lacks.

Key technical differentiators in 2026

  • State encryption: Native support for encrypting state files at rest using KMS, GCP KMS, or local keys before writing to remote backends like S3 or GCS.
  • Provider ecosystem: A separate but largely compatible registry; most official AWS/Azure/GCP providers work identically, though some niche third-party providers may lag.
  • No telemetry: Removed all optional usage tracking present in newer Terraform versions, simplifying air-gapped and restricted-network deployments.
  • Community RFC process: Feature decisions follow a public RFC model rather than vendor-driven prioritization.

How do you migrate from Terraform to OpenTofu safely?

Migration is straightforward for standard setups but requires discipline for complex state. Because OpenTofu reads Terraform state files directly, you do not need to export and re-import resources. The primary risk lies in provider version mismatches and backend configuration nuances. Always test in a non-production environment first and ensure your CI/CD pipeline references the correct binary.

  1. Audit provider dependencies: Run tofu providers lock against your existing lock file to verify all required providers are available in the OpenTofu registry at compatible versions.
  2. Update CLI commands: Replace terraform with tofu in scripts, Makefiles, and CI pipelines. The subcommands (init, plan, apply) remain identical.
  3. Validate state integrity: Execute tofu plan -refresh-only to confirm the state file parses correctly and matches real infrastructure without proposing destructive changes.
  4. Test backend connectivity: Verify remote state access works with your existing credentials; OpenTofu supports S3, GCS, Azure Blob, Consul, and HTTP backends natively.
  5. Enable state encryption (optional): Add an encryption block to your backend config if you want to leverage this OpenTofu-exclusive feature during migration.
# Example: Backend config with native state encryption
terraform {
  backend "s3" {
    bucket         = "infra-state-prod"
    key            = "global/network.tfstate"
    region         = "us-east-1"
    encrypt        = true
  }
  encryption {
    method = "aws_kms"
    kms_key_id = "arn:aws:kms:us-east-1:123456789:key/abcd-efgh"
  }
}

A common mistake is assuming all Terraform Cloud-specific features have equivalents. OpenTofu does not support Terraform Cloud workspaces, private module registries, or Sentinel policies. Teams relying on these must adopt alternatives like Terragrunt for workspace orchestration or OPA for policy-as-code before migrating.

Audit ProvidersLock File CheckReplace BinaryCI/CD + ScriptsValidate Stateplan -refresh-onlyProduction ApplyWith Encryption⚠ Critical Pre-Migration Checks• No Terraform Cloud/Sentinel dependencies • Provider versions pinned explicitly• State backup created • Rollback plan documented❌ AvoidMigrating live prod statewithout validation step✅ DoUse tofu plan -refresh-onlyto verify state parity first

Frequently Asked Questions

Yes, OpenTofu 1.9 maintains CLI and HCL compatibility with Terraform 1.5.x. Existing configurations work without modification, though you must reinitialize state backends and verify provider versions match your current infrastructure requirements before migrating production environments in 2026.

OpenTofu uses the LGPLv3 license allowing unrestricted commercial use and modification. Terraform switched to BSL 1.1 in 2023, restricting competitive offerings. This licensing divergence prompted the fork to guarantee perpetual open-source access for DevOps teams building internal platforms or commercial products.

Yes, it reads standard tfstate JSON formats natively. Run tofu init to migrate backend configurations. Always backup state before conversion, as newer OpenTofu features may write metadata incompatible with older Terraform CLI versions during subsequent apply operations.

It defaults to the OpenTofu Registry at search.opentofu.org, which mirrors most HashiCorp providers. You can configure custom registries or fallback sources in .tofurc files to ensure supply chain continuity if specific upstream modules become unavailable or restricted.

No, those are proprietary SaaS products tied to Terraform licensing. OpenTofu integrates with open alternatives like Spacelift, Env0, or self-hosted Atlantis. Configure remote backends using standard S3, GCS, or PostgreSQL to manage state collaboration without vendor lock-in.

Use the official apt or yum repositories for signed packages, or download binaries from GitHub releases. Verify checksums against release manifests. Most CI/CD pipelines now include native OpenTofu setup actions that replace previous terraform-install steps automatically.

Yes, Terragrunt v0.70+ includes native OpenTofu support via the TFO_BINARY environment variable. Other tools like Pulumi, CDKTF, and Meshery also added compatibility throughout 2025, ensuring ecosystem tooling continues functioning without requiring extensive wrapper rewrites or configuration changes.

The Linux Foundation backs OpenTofu with dedicated maintainers who typically patch CVEs within days of disclosure. Security advisories publish on their GitHub repository. Teams should subscribe to RSS feeds and automate version checks to maintain parity with upstream security fixes.

State encryption remains compatible if using standard AES-256-GCM methods. However, OpenTofu introduced client-side encryption enhancements in 1.8. Review your encryption key management setup during migration to ensure decryption keys remain accessible across both toolchains during transition periods.

Benchmarks show negligible differences for typical apply operations. OpenTofu removed telemetry overhead present in newer Terraform versions, sometimes resulting in slightly faster plan phases. Performance depends more on provider efficiency and API rate limits than the core binary itself.

Avoid mixing them in single projects due to state format drift risks. Separate directories by tool if transitioning gradually. Use distinct backend prefixes to prevent accidental state corruption when team members run different CLIs against shared infrastructure resources.

It respects identical version constraint syntax in required_providers blocks. Since it pulls from a mirrored registry, verify that pinned versions exist there. Some niche third-party providers may lag behind; test dependency resolution before committing to production migrations.

Yes, several consultancies and managed service providers offer enterprise support contracts as of 2026. The Linux Foundation also provides governance assurance. Evaluate vendors based on their contribution history and SLA terms rather than assuming parity with HashiCorp support tiers.

License changes were irrevocable and excluded competitive use cases. Community contributors sought guaranteed open governance under the Linux Foundation to prevent future relicensing. The fork ensures infrastructure-as-code remains truly open for all commercial and non-commercial applications indefinitely.

Use tofu fmt.