Switch an existing IaC project between Terraform and OpenTofu without recreating it. ops0 handles the CLI swap and updates internal tags so future deployments use the target engine.
| Scenario | Direction |
|---|---|
| Move to open-source licensing | Terraform → OpenTofu |
| Need a HashiCorp-specific provider feature | OpenTofu → Terraform |
| Organization standardizing on one engine | Either direction |
Terraform and OpenTofu are fully compatible at the configuration level. Your .tf files, state files, and providers work with both engines without modification.
| Aspect | Before | After |
|---|---|---|
| CLI used for plan/apply | terraform | tofu (or vice versa) |
| ManagedIaC tags | Updated to reflect new engine | Automatically rewritten |
| State file | No change — same format | Compatible across both |
| Provider plugins | Re-downloaded on first run | Same registry sources |
| Configuration files | No change | No change |
What does not change:
.tf files remain identicalNavigate to IaC → Projects and find the project you want to migrate.
In the project actions menu, select Migrate to OpenTofu or Migrate to Terraform depending on the current engine.
A confirmation dialog explains what will change:
Click Confirm to proceed. The migration completes in seconds.
Run a Plan to confirm the project works correctly with the new engine. You should see no unexpected changes.
Most providers work identically across Terraform and OpenTofu. Check for edge cases:
| Provider | Notes |
|---|---|
| AWS | Fully compatible |
| GCP | Fully compatible |
| Azure | Fully compatible |
| Oracle Cloud | Fully compatible |
| HashiCorp Vault | May require version pinning on OpenTofu |
Terraform and OpenTofu use the same state file format. Migration does not modify your state file. You can migrate back and forth without state issues.
The .terraform.lock.hcl file is compatible between both engines. On first plan after migration, the target CLI may update provider checksums in the lock file — this is normal.
If you need to switch back, repeat the same process in reverse. There is no one-way commitment — you can migrate between Terraform and OpenTofu as needed.