OpenTofu 1.8 Rolls Out New Features and Fixes

OpenTofu 1.8 open-source infrastructure as a code tool delivers early variable evaluation, new testing options, and key fixes.

Three months after its previous 1.7 release, OpenTofu, a project that emerged in response to HashiCorpโ€™s licensing changes for Terraform, released its brand-new 1.8 version.

For those unfamiliar, it is a software tool widely adopted in DevOps practices for automating and managing infrastructure as code (IaC). It lets users define and provision data center infrastructure using a high-level declarative configuration language.

This release brought eagerly anticipated enhancements that streamline the infrastructure management process and expand testing capabilities.

Key Features of OpenTofu 1.8

Early Variable/Locals Evaluation: This new feature allows variables and locals to be evaluated early in the configuration process. This is particularly useful for setting backend configurations, module sources, and encryption setups without depending on outputs from resources or data sources.

For example, users can synchronize configurations across different providers, like AWS, using the same variable for multiple settings.

Provider Mocking in Tofu Test: Tofu test now includes the capability to mock entire provider definitions, enabling users to generate mock values for resources and data sources specific to a provider.

This feature is crucial for developers looking to test integrations without the need to engage actual cloud resources, reducing costs and speeding up development cycles.

Resource Overrides in Tofu Test: Building on the mocking capabilities, OpenTofu 1.8 allows for overriding resources, data sources, and even entire modules within test configurations. This enhancement mimics traditional software testing methodologies where elements can be isolated and tested under controlled conditions.

Override Files for OpenTofu: The update introduces override files to maintain compatibility with Terraform while leveraging new features exclusive to OpenTofu. Developers can now use “.tofu” files that OpenTofu prioritizes over standard “.tf” files, allowing for seamless compatibility and easier maintenance.

Improvements and Deprecations

With OpenTofu 1.8, the use_legacy_workflow option has been deprecated from the S3 backend. Moreover, the new version includes numerous smaller improvements and bug fixes alongside major features.

More specifically, the update enhances performance with options like configurable state persistence intervals and compact JSON encoding for state files. It also addresses issues like encryption configuration validation and improves backend stability.

For more detailed information on all changes, visit the changelog or check out the list of the new OpenTofu 1.8 features here.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%