Skip to Content
Mengty Learns
IaC

Terraform vs OpenTofu: License, Features, and Choice

Compare HashiCorp Terraform and OpenTofu across license history (BSL vs MPL), feature divergence, compatibility, and which one to pick.

explanationintermediateTested with opentofu 1.13 (docs), terraform 1.17 (docs)Updated Nov 27, 2026

TL;DR

OpenTofu (MPL 2.0, CNCF) and Terraform (BSL 1.1, HashiCorp/IBM) share the same HCL roots and provider ecosystem, but have diverged since August 2023. Pick OpenTofu for open-source governance, client-side state encryption, and dynamic backend/module variables; pick Terraform if you are already standardized on HCP Terraform or HashiCorp enterprise support.

Context

On August 10, 2023, HashiCorp relicensed Terraform from the open-source MPL 2.0 to the source-available BSL 1.1 (restricting competing hosted offerings). The community forked Terraform 1.5.6 into OpenTofu under the Linux Foundation / CNCF, keeping MPL 2.0 permanently.

Comparison

DimensionOpenTofu (v1.13)Terraform (v1.17)
License & GovernanceMPL 2.0 (CNCF / Linux Foundation)BSL 1.1 (HashiCorp / IBM)
Client-side state encryptionBuilt-in encryption {} block (KMS, PBKDF2, OpenBao)Not built-in (relies on backend SSE or HCP Terraform)
Variables in backend & module.sourceSupported via early variable evaluation (1.8+)Not supported (must use -backend-config or static strings)
Provider-defined functionsSupported (provider::name::fn)Supported (provider::name::fn)
Managed platformSelf-hosted, Spacelift, env0, Scalr, GitHub ActionsHCP Terraform (Terraform Cloud) & Enterprise
Provider registryregistry.opentofu.org (mirrors public providers)registry.terraform.io

Decision criteria

  1. License & vendor lock-in: If your company policy or product embeds IaC tooling, MPL 2.0 (OpenTofu) avoids BSL 1.1 legal ambiguity.
  2. State security & DRY backends: OpenTofu's client-side encryption {} and variables inside backend {} remove whole classes of wrapper scripts (like Terragrunt boilerplate for backends).
  3. Existing platform investment: If you pay for HCP Terraform private registry, policy sets (Sentinel), and support SLAs, migrating off Terraform brings little upside.

Gotchas

  • State format divergence: once you enable OpenTofu-only features (like encryption {} or new state schema versions), Terraform cannot read that state file without decrypting/migrating first.
  • Registry URLs: registry.opentofu.org mirrors open-source providers, but a few commercial providers may have license terms tied to Terraform.
  • Mixing binaries: never run terraform apply and tofu apply interchangeably on the same state directory in CI.

Production checklist

  • Standardize on one binary (tofu or terraform) per repository and pin it in CI
  • Pin required_version and required_providers versions in versions.tf
  • Commit .terraform.lock.hcl (works for both) to lock provider checksums
  • If choosing OpenTofu, enable encryption {} on remote state

Check yourself

Check Yourself

1. What was the primary reason OpenTofu was forked from Terraform 1.5.6 in 2023?

2. Which feature is available in OpenTofu 1.8+ but forbidden in Terraform?

Sources