[Last updated 2024-07-30 for Terraform 1.9 and OpenTofu 1.8]
Terraform and OpenTofu are both IaC tools that share a common ancestry. OpenTofu was created when HashiCorp shifted the licensing of Terraform from Mozilla Public License 2.0 to Business Source License 1.1 aka BSL or BUSL.
OpenTofu is a fork on Terraform before the BUSL licensing change, so anything that has been added in Terraform 1.6 or newer will not be in OpenTofu, or at least the code backing any given feature will not be copied over. The OpenTofu maintainers can implement the same functionality using their own original code, but they cannot simply copy the Terraform code even though it is publicly available.
Likewise, any new features added to OpenTofu will not be back-ported into Terraform. While HashiCorp can add feature-parity, the actual code will be different.
Which might leave you wondering, which features are supported in each tool? Are they interchangeable? Can I move from one to the other without rewriting my code? The short answer? If you’re running Terraform 1.5.x or older, you should be able to drop OpenTofu in and run your code without any changes. If you’re running Terraform 1.6 or newer, you will need to check the table below to see if the feature you’re using is supported in OpenTofu. The features included in the table only reflect those that are in official releases and not in alpha or beta builds. I will endeavor to keep this table up to date as new GA features are added to either tool.
Feature | Terraform | OpenTofu | Feature parity |
---|---|---|---|
Testing framework | 1.6 | 1.6 | Yes |
Mock data in testing | 1.7 | 1.8 | Yes |
removed block | 1.7 | 1.7 | Yes |
Updated S3 backend | 1.6 | 1.6 | As far as I can tell, these appear to be identical |
Provider defined functions | 1.8 | 1.7 | Yes, but the terraform built-in provider functions may not be in OpenTofu |
State encryption | Not present | 1.7 | No |
Provider transfer or object | 1.8 | Not present | No |
Input variable validation with other objects | 1.9 | Not present | No |
Early variable/locals evaluation | Not present | 1.8 | No |
Support for .tofu files | Not present (of course) | 1.8 | No |
Those are all the major updates in versions 1.6 and newer. I should note that there maybe minor enhancements and bug fixes that are not included here.
You can always find the latest releases here:
If you think that I have missed something, please let me know via the contact form.
Resourcely Guardrails and Blueprints
November 15, 2024
Deploying Azure Landing Zones with Terraform
November 12, 2024
October 18, 2024
What's New in the AzureRM Provider Version 4?
August 27, 2024