OpenTofu

Why Should You Switch to OpenTofu?

Why should you switch to OpenTofu?

August 10, 2023, was a day to remember for anybody who works with infrastructure as code (IaC). On that day HashiCorp changed from an MPL license to a BUSL one for their products, including Terraform. I discussed some of the implications of these changes in the article Why OpenTofu is a Good Choice for IaC Adopters.

This move and the emergence of the OpenTofu initiative raise a couple of very important questions:

1. Should I move to OpenTofu?
2. If yes, why?

You’ll find the answers in this post.

Are you impacted by the Terraform license change?

Before we go into the reasons why you should move to OpenTofu, let’s discuss the potential impact of the license change on your work. The common perception is “I am a simple user, the license change doesn’t affect me.” In the short term, you might be right, but let’s decouple potential scenarios here:

  • The license itself doesn’t indicate with 100% clarity if you are a competitor or not. This is the licensor’s decision. Imagine you are a consultant who works on a project for a third party. You help them to build infrastructure, and you manage all supporting elements of it — including state file. Because you are paid for this service, you could be viewed as competition. But from another perspective, you are also a user of the tool. You don’t know which is the case. And this is the biggest gray area behind BUSL licenses.
  • Permission to use the software might be withdrawn without warning. Again, this is the licensor’s decision.
  • The license may be changed. Developing the previous topic further, the licensor may confirm you are eligible to use the software under BUSL, but how the BUSL is built allows the licensor to change the conditions at any time.

These examples illustrate just how risky it is to use the tool under a BUSL license, which jeopardizes the long-term safety of your SDLC. Many use cases do not violate a BUSL license, but other factors come into play, which we will discuss later.

Will Spacelift support Terraform after the license change?

The short answer to this question is: Yes, Spacelift supports previous and current versions of Terraform (v.1.5.5) without any change. The license change cannot be applied backward, so what was published under the MPL license stays open-source. The new BUSL license applies to any change made after HashiCorp’s announcement.

What does it mean for me?

Here are three potential ways to work with Terraform now and into the future:

  • If you are using Terraform 1.5.5 or lower, you can use Spacelift, and your process doesn’t change. If you plan to upgrade to a newer version, your options are outlined later in this post. Your workloads with Terraform versions up to and including 1.5.5 will work as before, and there is no change from a legal perspective. Spacelift continues to work on features, improvements, and all the elements that make Spacelift the best tool in the field.
  • If you are considering migrating to newer versions of Terraform (1.6 and more recent versions yet to be published), Spacelift is working on options to ensure support. The Spacelift team will publish information about this in a transparent way and communicate it to our customers.
  • Migration to OpenTofu is an option for you. Switching from Terraform to OpenTofu is currently as easy as changing the binary. As time progresses, migration may require more actions on your side, but you can rest assured that OpenTofu will supply you with all the support you’ll need.

What benefits does OpenTofu offer?

Migration to OpenTofu delivers multiple advantages. Let’s list them in three categories — continuity, stability, and progress.

  • Continuity
    • OpenTofu is currently 100% backward compatible with Terraform. It will remain backward-compatible with version 1.6 of OpenTofu.
    • Migration itself is simple and straightforward. It is largely just a binary change.
    • Support of the community is big and growing. At this point, the manifesto has been signed by almost 150 companies and more than 700 individuals.
    • Growth is stable. More than 20 engineers have pledged to work on the OpenTofu ecosystem.
  • Stability
    • OpenTofu has been donated to Linux Foundation, which ensures open-source stability.
    • Being under the control of the Linux Foundation ensures that OpenTofu remains open-source.
    • As a truly open-source project, OpenTofu intends to build the best IaC tool and ecosystem in the industry.
  • Progress
    • Having 20+ engineers working on the project ensures stable progress and the implementation of new functionalities.
    • As the heart of this open-source project, the community will have an important voice in the direction of improvements. You can share this voice and have a real impact on OpenTofu’s roadmap and feature implementation.
    • With community support, engagement, and vision, OpenTofu will respond to requests to ensure the best alignment with the market’s needs.

I want to migrate to OpenTofu. What should I do?

Now that OpenTofu 1.6 has been released, the migration from Terraform to OpenTofu is easy and seamless. There is no incompatibility in the code, how state files are managed, or the runtime. Therefore, switching between these two tools is very easy from the project’s outset.

If you decide to switch between your organization’s current Terraform run and OpenTofu v.1.6, the migration is as simple as switching the binaries to execute the IaC template.
Of course, it might involve more work if you use a relatively old version of Terraform, but it will follow the same process as switching between old and new versions of Terraform.

However, this might change in the future. Terraform and OpenTofu will implement fixes, new features, etc., which might require more work to migrate state and code.

OpenTofu’s first stable release is here, and it is production-ready. Check out our overview of what’s new.

Will Spacelift support OpenTofu?

Yes, of course! Spacelift was one of the first companies to join the initiative and is one of the founding members. The OpenTofu platform has our full support, and we are engaged in the project’s development. This ensures almost native binding between Spacelift and OpenTofu.

The OpenTofu is a brand-new initiative, so you are bound to have questions. For more information, contact the OpenTofu Initiative through its webpage. To add your support, give a GitHub star to the OpenTofu repositories, or add your pledge to the list of supporters!

OpenTofu will only be as strong as the community behind it. You can join that community and show your support by contributing to the public repository on GitHub. This contribution document explains how.

The Most Flexible CI/CD Automation Tool

Spacelift is an alternative to using homegrown solutions on top of a generic CI. It helps overcome common state management issues and adds several must-have capabilities for infrastructure management.

Start free trial