OpenTofu in depth
For most configurations written for Terraform 1.5 or earlier, migration is mechanical. Newer configurations need more care, because the tools have diverged. A safe sequence:
- Inventory. List every root module, its Terraform version, backend type and providers. Note any features added to Terraform after the fork.
- Back up state. Copy each state file, or snapshot the backend bucket, before changing anything.
- Check the migration guide. OpenTofu publishes version-specific guidance on moving from particular Terraform releases.
- Swap the binary in one non-production workspace. Run
tofu init to fetch providers from the OpenTofu registry, then tofu plan. - Expect a clean plan. A plan that shows no changes means state and configuration agree. Investigate any proposed change before applying.
- Update CI, pre-commit hooks and documentation, then repeat environment by environment.
Keep the ability to roll back for a while: until you adopt OpenTofu-only features, such as state encryption, the state remains readable by the tool you came from.
Example: encrypting state for a regulated workload
Example: a fintech team stores state in an object storage bucket. State files contain resource attributes such as database endpoints and sometimes generated passwords, so the team wants them encrypted on the client side, not only by the storage service. After moving to OpenTofu, they add an encryption block to the terraform settings, use a cloud KMS key as the key provider, and enable encryption for both state and plan files. They first run with a fallback configuration so existing unencrypted state can be read, then apply once to write it encrypted. Access to the KMS key is limited to the CI role that runs applies, so reading the bucket alone no longer reveals state contents.
Running OpenTofu in a team
The operational practices are the same as for any IaC tool:
- Remote state with locking, one state per environment and component, kept small.
- Plans generated in CI on every pull request and posted for review.
- Applies run only from CI with a dedicated identity, never from laptops.
- Policy as code checks on the plan, using tools such as Checkov, Trivy or Conftest with OPA.
- Scheduled drift detection: a plan run that alerts when real infrastructure no longer matches code.
Orchestration tools such as Atlantis, Terragrunt and several commercial platforms support OpenTofu. Confirm support for the specific versions you run.
| Consideration | Points toward |
|---|
| Open-source license and foundation governance required | OpenTofu |
| Client-side state encryption needed | OpenTofu |
| Heavy use of HCP Terraform or features added after the fork | Terraform |
| Building a commercial product on top of IaC | Review licenses carefully; often OpenTofu |
Common mistakes
Typical errors are mixing terraform and tofu runs against the same state after adopting OpenTofu-only features, skipping the clean-plan check, pinning no provider versions, and forgetting that modules from the public registry should be reviewed and version-pinned like any dependency. OpenTofu is one implementation of infrastructure as code; Gepton runs migrations and IaC setups in cloud infrastructure and IaC.