The OpenTofu Story: From Terraform to Open Source
The OpenTofu Story: From Terraform to Open Source
OpenTofu is the open-source continuation of the Terraform language and workflow, under the Mozilla Public License 2.0. This chapter is the history you need before you trust a module written for the other binary.
Learning goals
- Say what OpenTofu is, and what it deliberately kept from Terraform
- Place the August 2023 license change on a timeline
- Tell a 1.5-era configuration from a feature that exists on only one of the two tools
- Choose OpenTofu for a reason you can write down
What Is OpenTofu?
OpenTofu is a command-line tool, tofu, that reads HashiCorp Configuration Language (HCL) and reconciles it with infrastructure through provider plugins. You declare resources. It builds a plan. You apply the plan. It records what it created in a state file.
The project is a fork of Terraform as it stood under MPL 2.0. The Linux Foundation hosts it. In April 2025 the project was accepted into the CNCF sandbox. Providers are not rewritten by OpenTofu. The same provider plugins Terraform uses are published for the OpenTofu registry at registry.opentofu.org, and the protocol between tofu and those plugins is the Terraform plugin protocol.
This book pins 1.13.2, released 21 October 2026. The 1.13 series is the supported line until 1 August 2027. Terraform’s version numbers are not OpenTofu’s. In the same month Terraform’s current release was in the 1.17 series. Equal numbers do not mean equal features, and a higher Terraform number does not mean OpenTofu is behind on every axis. State encryption shipped in OpenTofu 1.7 and is not a Terraform language feature.
The Terraform License Change: A Turning Point
Through Terraform 1.5.x, HashiCorp shipped Terraform under MPL 2.0. On 10 August 2023 HashiCorp moved future releases of Terraform, and of several other products, to the Business Source License (BSL, also written BUSL) 1.1. The BSL is source-available. It is not an Open Source Initiative license. It restricts using the licensed software to offer a competing product.
1.5.x remained the last MPL release. Configurations, state, and the provider protocol up to that line are the common ancestor. Everything HashiCorp shipped as Terraform 1.6 and later is under the BSL. Everything OpenTofu shipped is under MPL 2.0, starting from that ancestor and then diverging on purpose.
The practical effect for an engineer: you can read either codebase, and your lawyer will care which binary you ship inside a product. The practical effect for a module: a file that only uses language from 1.5 loads in both. A file that uses a feature added on one side after the fork needs the binary that has it.
HashiCorp vs. Linux Foundation: The Fork That Changed Everything
The fork was announced as an open-source Terraform, then named OpenTofu, and contributed to the Linux Foundation so the trademark and the governance were not a single vendor’s. The first stable OpenTofu release was 1.6 in January 2024, compatible with the 1.5 language and ready to keep moving.
Governance is the part that is easy to skip and expensive to misunderstand. HashiCorp (later under IBM) decides Terraform’s product direction, including HCP Terraform, Stacks, and Sentinel. The OpenTofu technical steering committee decides OpenTofu’s direction in public issues and RFCs. A feature that is a commercial control plane on one side may be a CLI feature, or absent, on the other.
The registry split follows the same line. registry.terraform.io is HashiCorp’s. registry.opentofu.org is the community registry. Provider namespaces such as hashicorp/aws exist on both because the providers themselves stayed available. When you write source = "hashicorp/aws" in this book, tofu init resolves it through the OpenTofu registry unless you override the host.
OpenTofu vs. Terraform: Compatibility, Differences, and Trade-offs
Treat compatibility as three layers.
| Layer | What still matches | What has diverged |
|---|---|---|
| Language shared with 1.5 | Resources, modules, count, for_each, import blocks, checks, the testing framework’s early form |
— |
| State | State written by Terraform through 1.5.x is the documented drop-in. Later state can often be migrated, and you test that migration. You do not assume it | Client-side encryption of state and plan files is OpenTofu (1.7+) |
| Later language | Both grew ephemeral resources, write-only attributes, and provider for_each on their own timelines |
OpenTofu 1.13 adds convert and assumenotnull to tame unknown values at plan time. Terraform 1.13+ added Stacks, a query workflow, and a commercial policy product. Version numbers crossed and the features did not |
Other OpenTofu marks you will meet in later chapters: the .tofu file extension (1.8) for files that must not be read by Terraform, variables and locals inside module sources and backends (1.8), OCI registry addresses (1.10), S3 locking without a separate lock table (1.10), and the enabled meta-argument (1.11).
1.13 also removes WinRM from the file and remote-exec provisioners, changes base64gzip output bytes, requires macOS 13 or newer, and drops official 32-bit builds. Windows on ARM64 is a supported package. Read the series changelog before you bump a production pin. Chapter 14 is that upgrade habit.
When to Choose OpenTofu (and When Not To)
Choose OpenTofu when the license has to be MPL, when you want client-side state encryption in the CLI, or when you want the roadmap set by a foundation project rather than a commercial control plane. Choose it when your modules stay within the shared language, or within OpenTofu features you have pinned.
Stay on Terraform when a system you already pay for requires the Terraform binary: an HCP Terraform workspace, a Sentinel policy pack you are not ready to rewrite as Open Policy Agent, or a module that uses a Terraform-only feature you have confirmed OpenTofu rejects. “We might use Stacks later” is not a reason. A failing tofu init on a required feature is.
Do not run both binaries against the same state. Pick one per state file, pin it in .terraform-version or your runtime manager, and review the plan under that pin.
Summary
- OpenTofu is the MPL fork of Terraform’s 1.5-era CLI, hosted by the Linux Foundation
- The BSL change on 10 August 2023 is why the fork exists
- Shared language is not shared version numbers. This book pins 1.13.2
- State encryption is an OpenTofu feature. Sentinel and HCP Terraform are not
- One state file, one binary
Sources
- OpenTofu project: https://opentofu.org/
- Mozilla Public License 2.0: https://www.mozilla.org/MPL/2.0/
- OpenTofu releases and the 1.13 changelog: https://github.com/opentofu/opentofu/releases