Switching from Terraform to OpenTofu

In the ever-evolving landscape of infrastructure as code (IaC), staying adaptable and proactive is crucial. Our latest initiative involves transitioning from Terraform to OpenTofu, driven primarily by the recent licensing changes introduced in Terraform version 1.6.0 and beyond. Today we are happy to announce we have fully migrated to OpenTofu with version 1.6.2.

Why OpenTofu?

The licensing changes in Terraform versions 1.6.0 and above have forced us to explore alternatives that are compatible with our working. OpenTofu quickly emerged after the announcement from Hashicorp as a robust and community-driven alternative, ensuring that our IaC processes remain transparent and free from restrictive licenses.

The Transition Plan

Since Terraform is at the core of our infrastructure management, transitioning to OpenTofu required a well-structured plan to ensure a seamless shift. Our transition plan was divided into four key phases:

Phase 1: Experimentation

Platform Team Trials: Our platform team began experimenting with OpenTofu as a drop-in replacement for Terraform. This initial phase involved testing compatibility and functionality to ensure a smooth transition.

Phase 2: Team Transition

Team-Wide Adoption: Once the stacks were updated and tested, we moved the entire Skyscrapers (SkS) team to OpenTofu, ensuring everyone was on board with the new tool.

Phase 3: Automation

Automation Updates: After some more thourough testing, we proceeded with updating our automation. We updated our CI/CD pipelines to use OpenTofu instead of Terraform, ensuring that all deployments and infrastructure changes were managed through OpenTofu.

Phase 4: Customer Communication

Customer Announcement: we are now happy to announce that we have successfully transitioned to OpenTofu and are fully operational with the new tool.

In the case you are making any adjustments to the infrastructure, please make sure to use OpenTofu instead of Terraform. While they are still compatible today, chances are that they will diverge in the future and break compatibility. Take a look at our Documentation for more information on how to use OpenTofu.

Next steps

With the transition to OpenTofu complete, we are now ready to evolve further and explore the new possibilities that OpenTofu offers starting with the upgrade to OpenTofu 1.7.0.

Considerations and Notes

  • Compatibility: While we expect minimal issues, some providers not mirrored by OpenTofu might pose challenges for specific use cases.

  • Cross-Compatibility: Currently, OpenTofu and Terraform 1.6 are cross-compatible. However, future versions might diverge in their feature sets.

  • Version Locking: It’s not yet possible to lock our codebases exclusively to OpenTofu. The current terraform block handles version locking, but future updates might introduce a dedicated tofu block.

Resources

For more information on OpenTofu, explore the following resources: