# OpenTofu vs. Terraform

## Introduction

In this article, we will be reviewing the key differences between [**OpenTofu**](https://opentofu.org/) and [**Terraform**](https://www.hashicorp.com/products/terraform), two popular infrastructure-as-code (IaC) tools used for provisioning and managing cloud resources. While both tools share a similar foundation, OpenTofu emerged as a response to HashiCorp’s 2023 licensing changes to Terraform, offering a fully open-source alternative.

## Why was OpenTofu Created?

In August 2023, HashiCorp announced that it would change the license of Terraform from the Mozilla Public License (MPL 2.0) to a Business Source License (BSL). The BSL change sparked a backlash from the open-source community and Terraform users.

In response to these concerns, a group of developers, including former contributors to Terraform, decided to fork Terraform and create an open-source version with a completely permissive license. This fork became OpenTofu. More information can be found under [OpenTofu’s Manifesto](https://opentofu.org/manifesto/).

## What are the differences?

### Compatibility

As of version 1.6, OpenTofu maintains compatibility with Terraform 1.6, allowing for a straightforward migration process. OpenTofu is committed to continuing to support Terraform 1.x releases. More information can be found [here](https://opentofu.org/docs/language/v1-compatibility-promises/).

### Development & Community

* **Terraform:** Development is primarily driven by HashiCorp, with feature implementation and roadmap decisions made internally. [https://github.com/hashicorp/terraform](https://github.com/hashicorp/terraform)
    
* **OpenTofu:** Emphasizes community involvement, allowing contributors to influence feature development and prioritization. This collaborative approach aims to address user needs more responsively. [https://github.com/opentofu/opentofu](https://github.com/opentofu/opentofu)
    

### Comparison

This table was pulled from [Spacelift.io](https://spacelift.io/blog/opentofu-vs-terraform)

| **Feature** | **OpenTofu** | **Terraform** |
| --- | --- | --- |
| Language | HCL | HCL |
| State Management | ✅ Yes | ✅ Yes |
| State Encryption | ✅ Yes | ❌ No |
| Early Variable Evaluation | ✅ Yes | ❌ No |
| Provider Functions | ✅ Yes | ✅ Yes |
| Community Driven | ✅ Yes, there is an [issue ranking system](https://github.com/opentofu/opentofu/issues/1496) [you can influence.](https://github.com/opentofu/opentofu/issues/1496) | ❌ No |

## Examples

### Init

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1737004829436/ec7b3809-13ad-4156-b9ed-ea2679f9244c.png align="center")

### Plan

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1737005187827/c92e2d7e-058d-4099-9c95-41f07b46a80d.png align="center")

### Apply

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1737005320764/2721dca6-c0d2-4c2f-9ef1-1c6230724248.png align="center")

## Reference

* [https://opentofu.org/blog/](https://opentofu.org/blog/)
    
* [https://www.hashicorp.com/blog/products/terraform](https://www.hashicorp.com/blog/products/terraform)
    
* [https://www.hashicorp.com/license-faq](https://www.hashicorp.com/license-faq)
    
* [https://opentofu.org/docs/language/v1-compatibility-promises/](https://opentofu.org/docs/language/v1-compatibility-promises/)
