OpenTofu 1.8.0 Released
Malcolm Matalka
On this page
Introduction
OpenTofu version 1.8.0 is now available! This update introduces multiple improvements, including a highly anticipated feature: support for locals/variables in module sources and backend configurations.
Quick Overview: What is OpenTofu?
OpenTofu is a tool for managing infrastructure as code, enabling users to declaratively provision and oversee cloud resources across multiple providers. It originated as a fork of Terraform after HashiCorp transitioned Terraform’s license to the more restrictive Business Source License (BUSL). Similar to Terraform, OpenTofu utilizes HashiCorp Configuration Language (HCL) to define resources and their desired states.
Although OpenTofu and Terraform share many features, there are notable distinctions. OpenTofu is a community-driven fork aiming to maintain the original open-source spirit of Terraform, while the future of Terraform is tied to HashiCorp’s commercial interests (now part of IBM).
OpenTofu 1.8.0 Highlights
The 1.8.0 release introduces features the community has eagerly awaited. This open-source alternative is now providing users with features that were previously overlooked by HashiCorp. The ability to use variables and locals in module sources and backend configurations significantly improves the management of large repositories.
Leveraging Locals/Variables in Module Sources and Backend Configurations
Previously, the inability to use variables and locals during the tofu init
phase was a common frustration. Without this feature, users couldn’t reference variables and locals in module sources and backend configurations. This new capability simplifies maintaining a DRY (Don’t Repeat Yourself) codebase.
Historically, variables couldn’t be used in the init
phase because much of the HCL evaluation occurs in the plan
and apply
phases.
Many users relied on third-party tools to handle these situations. With OpenTofu 1.8.0, users can now manage large codebases more efficiently by incorporating local variables in module sources and backend configurations.
Here’s an example:
Module Sources
Backend Configurations
Additional Enhancements
Alongside locals/variables in the init
phase, OpenTofu 1.8.0 brings several other new features:
- New
.tofu
file extensions for OpenTofu-specific overrides of.tf
files - Support for
override_resource
,override_data
, andoverride_module
blocks in the testing framework - Introduction of
mock_provider
,mock_resource
, andmock_data
blocks in the testing framework
Growing OpenTofu Community
Since its inception, OpenTofu has experienced significant community growth and adoption. Although exact user metrics are unavailable, the project has seen a steady month-over-month increase in registry usage, with requests exceeding one million per day. The OpenTofu GitHub repository has also earned over 20,000 stars, reflecting strong community interest and support.
The OpenTofu community has been highly active, with over 30 unique contributors participating in the 1.8.0 release. The community has opened numerous issues, submitted pull requests, and actively promoted OpenTofu and its advantages.
Several factors contribute to OpenTofu’s growing momentum. Primarily, the project’s dedication to remaining truly open-source and community-driven resonates with users who value transparency and collaboration—the principles that originally fueled Terraform’s popularity. HashiCorp’s licensing changes have eroded trust, prompting users of all sizes to transition to OpenTofu.
Furthermore, the regular release schedule and the introduction of new, user-requested features contrast sharply with mainline Terraform, which has faced criticism for neglecting feature requests that often remain unaddressed for years. For instance, a proposal for variables in backend configuration blocks was first suggested in 2017.
Conclusion
OpenTofu 1.8.0 is a robust release that introduces one of the most significant new features to the Terraform ecosystem in recent times. Beyond the technical merits, the 1.8.0 release symbolizes the strength and momentum of an open-source fork that has delivered a highly requested feature before the original project.
If you’re interested in shaping the future of OpenTofu, now is a great time to get involved by opening issues, contributing code, and joining the OpenTofu community on Slack.