Free — no signup required

OpenTofu: The Open-Source Fork

2 min read

Why OpenTofu Exists

In August 2023, HashiCorp changed Terraform's license from the open-source Mozilla Public License (MPL 2.0) to the Business Source License (BSL 1.1). The BSL restricts use of the software in products that compete with HashiCorp. This created uncertainty for companies building tools and services on top of Terraform.

In response, the Linux Foundation launched OpenTofu — a community-maintained fork of Terraform, based on the last MPL-licensed version (1.5.x), committed to remaining open-source under the MPL 2.0 license.

Compatibility and Differences

OpenTofu is designed as a drop-in replacement for Terraform. For the vast majority of configurations, switching is as simple as replacing the terraform binary with the tofu binary — every subcommand (init, plan, apply) is identical. HCL syntax, provider compatibility, state file format, and module structure are all compatible. OpenTofu reads and writes the same terraform.tfstate format.

OpenTofu has begun diverging with features not present in Terraform:

  • Native state encryption: OpenTofu 1.7+ supports encrypting the state file at rest using a key management provider (AWS KMS, GCP KMS, or a passphrase), without relying on S3 server-side encryption alone.
  • tofu test improvements: Enhanced testing framework with additional assertion capabilities.
  • Provider-defined functions: Allows providers to expose custom functions callable in HCL expressions.

Which Should You Use?

Factor Terraform OpenTofu
License BSL 1.1 (restrictions apply) MPL 2.0 (fully open-source)
Backing HashiCorp / IBM Linux Foundation
Ecosystem maturity Larger (more tutorials, Stack Overflow answers) Growing rapidly
Feature parity Reference implementation Adds features Terraform lacks
Enterprise support HashiCorp Enterprise Multiple vendors (Spacelift, env0, etc.)

For new projects, OpenTofu is a strong choice — especially in organizations with open-source policies or those building tooling on top of the IaC engine. For existing Terraform users, migration is low-risk due to high compatibility.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free