TECH_COMPARISON
OpenTofu vs Terraform: A Detailed Comparison for System Design
Compare OpenTofu and Terraform for IaC — license differences, feature parity, community governance, and migration path.
OpenTofu vs Terraform
OpenTofu is a fork of Terraform created in response to HashiCorp's August 2023 license change from MPL 2.0 to BSL (Business Source License). OpenTofu maintains the MPL 2.0 license and is governed by the Linux Foundation. Both tools are functionally similar, but they are diverging over time.
Why OpenTofu Exists
HashiCorp changed Terraform's license to BSL, which restricts using Terraform in products that compete with HashiCorp's commercial offerings. This alarmed companies building Terraform-based SaaS products (Spacelift, env0, Scalr) and organizations with open-source-only policies. The community forked Terraform 1.6 as OpenTofu, placing it under Linux Foundation governance.
Compatibility
OpenTofu started as a direct fork of Terraform 1.6 and maintains broad compatibility. Existing Terraform code, state files, providers, and modules work with OpenTofu with minimal changes. The CLI commands are identical (replacing terraform with tofu). Migration is straightforward for most projects.
Diverging Features
OpenTofu has added features not in Terraform:
- Client-side state encryption: Encrypt sensitive values in state files before they reach the backend. Terraform only supports backend-level encryption.
- Early variable/locals evaluation: Evaluate variables and locals before the main plan phase.
Terraform continues adding features under HashiCorp's roadmap that may not appear in OpenTofu, and vice versa. Over time, the two projects will diverge further.
Choosing Between Them
If licensing matters (you are a HashiCorp competitor, have open-source-only policies, or want community governance), choose OpenTofu. If you want HashiCorp's enterprise support, the latest HashiCorp features, and the largest community, stay with Terraform. Both are production-ready for IaC.
For IaC patterns in system design interviews, explore our concepts and interview questions. Check pricing for access.
GO DEEPER
Master this topic in our 12-week cohort
Our Advanced System Design cohort covers this and 11 other deep-dive topics with live sessions, assignments, and expert feedback.
// RELATED_COMPARISONS
Terraform vs Pulumi: A Detailed Comparison for System Design
Compare Terraform and Pulumi for infrastructure as code — language support, state management, ecosystem, and when to use each.
Ansible vs Terraform: A Detailed Comparison for System Design
Compare Ansible and Terraform for infrastructure automation — provisioning vs configuration, when to use each, and how they complement each other.
Pulumi vs Terraform: General-Purpose IaC Language Comparison
Compare Pulumi and Terraform on programming language flexibility, state management, testing capabilities, and cloud provider coverage for infrastructure as code.
Terraform vs CloudFormation: A Detailed Comparison for System Design
Compare Terraform and AWS CloudFormation for IaC — multi-cloud support, language, state handling, and which to pick for your stack.
Pulumi vs CDK: A Detailed Comparison for System Design
Compare Pulumi and AWS CDK for infrastructure as code — multi-cloud support, language options, abstractions, and tradeoffs.
Terraform vs Ansible: Infrastructure as Code vs Configuration Management
Compare Terraform and Ansible on idempotency, state management, infrastructure provisioning, and configuration management for DevOps teams.