DEV Community

Rafael Herik de Carvalho
Rafael Herik de Carvalho

Posted on

In Light of Terraform Licensing Changes, OpenTofu Offers a Free, Open-Source Path

As of April 2024, HashiCorp has become part of IBM. This acquisition has sparked concerns about the future of Terraform, mainly due to HashiCorp’s controversial license change to a BSL License in August 2023.

"BSL 1.1 is a source-available license that allows copying, modification, redistribution, non-commercial use, and commercial use under specific conditions."

This scenario exemplifies the challenge of monetising open-source software. Large open-source projects are typically sustained by big tech companies, which provide funding and engineering resources. This support allows projects to maintain a dedicated workforce to keep the development engine running smoothly.

Concerns Surrounding the Acquisition

Two main concerns have been raised about IBM’s acquisition of HashiCorp:

  • IBM's Track Record: IBM has a history of unsuccessful acquisitions of promising companies, which raises doubts about the future success of Terraform under its new ownership.

  • Conflict of Interest: IBM’s cloud offerings present a potential conflict of interest. Terraform is widely used to manage infrastructure on major cloud platforms like AWS, Azure, and GCP. This could reduce effort or interest in maintaining integrations with competing cloud providers.

Considering Alternatives to Terraform

If you are currently using Terraform and are not inclined to acquire licenses in the future, consider exploring alternatives. The most straightforward option is OpenTofu.

Following the license change, a private fork of Terraform was created, leading to the release of OpenTofu. You can read the official announcement here.

Terraform vs OpenTofu: What Are the Differences?

Apart from licensing, Terraform and OpenTofu are fundamentally the same. Since the fork is relatively recent, they function very similarly. Here's an overview:

Installing OpenTofu

For Linux and macOS, you can install OpenTofu via Homebrew:


brew update
brew install opentofu
Enter fullscreen mode Exit fullscreen mode

Usage
After installation, using OpenTofu is almost identical to using Terraform:

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "4.1.0"
    }
  }
}

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example-rg" {
    name = "example-rg"
    location = "West Europe"  
}
Enter fullscreen mode Exit fullscreen mode

With this infrastructure configured, initialize OpenTofu:


tofu init

Initializing the backend...

Initializing provider plugins...

OpenTofu has been successfully initialized!

You may now begin working with OpenTofu. Try running "tofu plan" to see any changes that are required for your infrastructure. All OpenTofu commands should now work.

If you ever set or change modules or backend configuration for OpenTofu, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary.

Enter fullscreen mode Exit fullscreen mode

From now on, you only need to replace the terraform command with tofu to run your IaC.

For more details on migrating from Terraform to OpenTofu, visit the migration guide.

Final Thoughts

I'm launching a new GitHub repo to explore examples using OpenTofu further. Please follow the repo here.

This post aims to introduce OpenTofu as a viable alternative and encourage community engagement in using and improving this important tool in the modern cloud development landscape.

Top comments (0)