#83 - Opentofu Vs Terraform: Where We Are Now With Cole Bittel
State encryption and dynamic backends challenge the case for staying on Terraform.
16 min read
It’s been a while since OpenTofu was released to the public, so we wanted to check in on where it stands today. How is the community adopting it? What’s the public sentiment? And how does it differ from Terraform in terms of features?
This time we’re joined by Cole Bittel, an experienced SRE, platform engineer, and contributor to OpenTofu. He shares his hands-on experience migrating to OpenTofu, and we look into the problems teams face with infrastructure as code and how both Terraform and OpenTofu approach solving them.
Picking an infrastructure binary when nothing forces your hand
You open a new repository this week and type either terraform init or tofu init. Nothing in your environment makes that choice for you. If you run Terraform for your own infrastructure, HashiCorp’s licence change never reached you: the licensing FAQ says the Business Source License “imposes no restrictions on internal use of our tooling”. The restriction lands on a competing offering you provide to third parties. The decision is yours, and two years after the fork it has to rest on something other than legal risk.
That’s harder than it used to be, because the comfortable answer, that the two are the same tool, has stopped being true. OpenTofu encrypts state, takes variables in a backend block and iterates provider configurations. Terraform went a different way at the same problems, with ephemeral values and write-only arguments. The longer you leave the decision, the less a migration looks like a binary swap and the more it looks like a feature audit.
Cole Bittel joined us to work out where the fork actually stands. He’s an SRE and platform engineer based in Copenhagen, a decade into DevOps work. He spent years in Danish scaleups and fintechs including Pleo, and recently went out on his own as a freelance consultant. He also contributes to OpenTofu: his change adding -target-file and -exclude-file was merged in April 2025. He runs OpenTofu. Most of our client work is still on Terraform.
The licence fight is over, the ownership question isn’t
Start with what’s settled, because it’s smaller than the noise around it.
Does the Business Source License stop you running Terraform?
Not for internal infrastructure use: the restriction lands on vendors who host or embed Terraform in a competing offering provided to third parties.
What changed instead is who you’re buying from. HashiCorp went public on the Nasdaq in December 2021 and moved Terraform to the BSL in August 2023, four months before Mitchell Hashimoto left the company he founded. IBM closed its acquisition on 27 February 2025 at an enterprise value of $6.4 billion, and the stock delisted.
Our read on why Terraform got squeezed, from customer work rather than from anything the company said: Terraform was never where the money was. Ask for a Vault licence and you’ll see what a cash cow looks like, and Consul Enterprise is the other one. Terraform Cloud was the attempt to productise the rest, and by then Spacelift, env0 and Scalr were after the same budget. What the BSL reaches is a paid offering that overlaps a HashiCorp commercial product, a line most of the people arguing about it never stood anywhere near.
There’s a part of this that isn’t an engineering argument, and we won’t dress it up as one. For some of us the pull toward the fork started as a feeling: a company whose free tools your whole career was built on now answers first to a quarterly number and then to IBM.
Who pays the people who fix your bugs
Sentiment founds a project. Payroll keeps one alive, which is what to check before you put your infrastructure behind a fork.
Is OpenTofu funded well enough to bet your infrastructure on?
It’s paid work rather than weekend enthusiasm: the Linux Foundation’s launch announcement of 20 September 2023 put a starting commitment of “a minimum of 18 full-time developers over at least the next five years” behind the project, backed by Harness, Gruntwork, Spacelift, env0, Scalr and others.
In practice that means roughly twenty core contributors drawing salaries from companies that compete with each other, full time, on MPL-licensed code under shared governance. The incentive is not charity. Each of those vendors needs a binary it is allowed to ship, so the thing they all need is the thing they all pay for. Governance followed the money: the project launched under the Linux Foundation, and the CNCF accepted it as a sandbox project on 23 April 2025, the entry rung, which settles that there’s a neutral home and a published governance model, not that the project is mature.
That core is small enough to reach from outside, too. The -target-file and -exclude-file options came in that way, shipping in 1.10.0 two months after the merge, and the verdict on that review was “OpenTofu is a really solid community of welcoming core contributors.” Usage points the same way: 9.8 million downloads from GitHub releases alone by that release, and a project estimate of “well past 20 million” once package managers and mirrors are counted, which are the project’s own numbers rather than anything verified here. It isn’t a vending machine, though. Early evaluation of variables, the most requested issue in the project, took until 1.8 in July 2024, and twenty paid maintainers is a small team for a tool this size.
Migrating is still a binary swap, for now
None of that matters if the move itself is expensive, so this is the number to get right.
How much work is it to move a repository to OpenTofu?
Back up the state, work through the migration guide for the Terraform version you’re on, then run tofu init and tofu plan and check the plan comes back empty.
Painless is not the same as unceremonious, and the guide asks for a few things before the swap. Get to a clean terraform plan first, because migrating with pending changes isn’t recommended, and back up the state; on a remote backend, exercise the restore at least once instead of assuming it works. Anything below Terraform 1.5.7 upgrades to 1.5.7 before it migrates at all, then lands on OpenTofu 1.6.2 and upgrades onward. Then tofu plan should print “No changes”, and when it doesn’t, the guide’s own instruction is to roll back to Terraform and work out why.
The honest caveat sits in the timing. That hackathon happened shortly after the fork, when the two tools were still the same language. Both have shipped a lot since. A repository still on Terraform 1.5.7 is a swap. A repository on current Terraform that uses write-only arguments or Stacks is a port, because there’s nothing on the other side to receive those.
If you want to hedge, OpenTofu 1.8 added a file extension for exactly this: create foo.tofu beside foo.tf and OpenTofu reads the first and ignores the second. Module authors use it to support both tools from one repository, and it lets you run both binaries against the same code while you decide.
Secrets in state: encrypt them, or never write them
Features are where the two tools now genuinely part company, and state encryption is the difference most likely to move us.
What’s the difference between OpenTofu’s state encryption and Terraform’s ephemeral values?
One encrypts the file your secrets land in. The other tries to stop them landing there at all.
OpenTofu 1.7 took the first route in April 2024. State encryption covers the state and plan files at rest, on any backend, with keys from AWS KMS, GCP Cloud KMS, OpenBao or a PBKDF2 passphrase. Pull the file out of the bucket without the key and it’s noise.
Terraform took the second route. Ephemeral values arrived in 1.10, and write-only arguments in 1.11: aws_db_instance takes a password_wo that the provider uses and Terraform then discards.
We like the idea and we’ve found the implementation hard to live with. If the value never lands in state, Terraform can’t tell when it changed, so you supply a companion password_wo_version to say “this one is new”. A timestamp there triggers on every run, and a hash of the secret doesn’t even get that far: any expression referencing an ephemeral value becomes ephemeral itself, and the version argument isn’t a context where an ephemeral value is allowed. It has to persist, because Terraform “stores version arguments in state, and can track if a version argument changes”. So it’s a plain integer, supplied separately from the secret and bumped by hand on rotation, which leaves two things somebody has to keep in step. If the secret sits in SSM Parameter Store you can try its version number, since SSM hands you one that moves on its own. That’s off a couple of experiments, not a pattern we’ve run in production.
The discipline spreads through the rest of the configuration. An output marked sensitive = true still goes into state, because sensitivity only redacts it from CLI output; to pass a secret out of a module you mark the output ephemeral, which only another ephemeral context can read and the root module can’t declare at all.
Say what encryption doesn’t buy you, though, because OpenTofu’s own docs do. It won’t stop a replay attack with an older state file, and it “does not and cannot protect the sensitive values in the state file from the person running the tofu command”. The same docs want a tested recovery plan and key backups first.
Backends can’t take variables, which is why Terragrunt exists
The other difference that would actually move us has nothing to do with secrets and everything to do with directory layout.
Why can’t you put a variable in a backend block?
On Terraform you can’t, by design: “A backend block cannot refer to named values (like input variables, locals, or data source attributes)”, its documentation says.
Follow that restriction through and you get the layout everyone recognises. Development, staging and production each want their state in a bucket inside their own account, so each needs a different bucket name, so each needs its own directory holding a four-line main.tf with a hardcoded backend, all of them pointing at the same shared module. One of the main reasons Terragrunt exists is to paper over that with its own templating.
There’s a plainer way out that we’ve shipped for several customers. Leave backend "s3" {} empty and pass every key at init time with -backend-config, which Terraform calls partial configuration, driven by a wrapper script that knows the values; a variant defaults the directory to dev and takes a flag to point at anything else. We’ve looked at moving customers to Terragrunt and backed off, because a short script was doing the job and Terragrunt is a dependency with its own life.
OpenTofu 1.8 removes the restriction instead. Early evaluation lets variables and locals appear in backend configuration, module sources and encryption configuration, as long as they don’t depend on resources, data sources or module outputs. One catch comes with it, and the answer moved between releases: on 1.8, "tofu init will fail if it is missing variables needed for static evaluation", while on 1.9 it “will now prompt you for the variables needed for evaluation”. A prompt is no use in CI, so pass the values on the init command with -var or -var-file.
for_each on providers, and the AWS escape hatch
The feature people most often credit the fork with isn’t the one that happened, so it’s worth being precise about what changed.
Did OpenTofu fix for_each?
Not the for_each most people remember: iterating resources and modules has worked in both tools since Terraform 0.13 in 2020. What OpenTofu added in 1.9, in January 2025, is for_each on provider blocks in ordinary .tf configuration, where Terraform still makes you write each configuration out by hand.
That gap shows up the moment you work across regions or accounts. Without provider iteration you write one aliased provider block per region and thread providers = {} down through every module call; with it you write the list once and iterate. Each configuration in a for_each needs an alias, so the default un-aliased one isn’t covered.
Terraform does iterate provider configurations in one place, and it isn’t your .tf files. In Stacks, providers are declared in a .tfcomponent.hcl file and take for_each directly. That’s a separate configuration language running on HCP Terraform, and it was still in beta at the time of recording. Rewriting your root modules as Stacks is a different trade from a flag in the files you already have.
Outside Stacks, Terraform’s answer came from the provider rather than the language. The AWS provider’s 6.0 release injects a region argument into nearly every resource, so a single aws provider block can serve many regions and you set the region at the resource. Global services such as IAM and Route 53 are unaffected because they were never regional.
Note what that does and doesn’t cover. It solves regional spread under one set of credentials: same account, same role, many regions. It doesn’t help when the credentials vary, because a second account still needs its own provider configuration with its own assume_role. Nor does it reach past AWS: wire up Cloudflare, Datadog and Kubernetes, and each vendor solves it separately or not at all.
Why we’re still on Terraform
With all of that on the table, the obvious question is why most of our work hasn’t moved.
If OpenTofu is ahead on these features, why haven’t you switched?
Because a migration competes for budget with everything else on the roadmap, and swapping a working tool for a near-identical one doesn’t clear the bar.
The test we apply to any platform change is a two or threefold improvement in something we can name. Here you’re mostly swapping one thing for another that behaves the same, and customers ask what the return is. The second reason comes from customers rather than from us: Terraform is the market default, so if the consultant who set it up leaves, more people recognise what’s in the repository.
What would change the answer is specific. If IBM announced tomorrow that Terraform was done, or security fixes stopped landing, you’d have to act. Short of that, the thing to budget for is the last two percent: it behaves the same in the overwhelming majority of cases, and the work is finding where it doesn’t and what that costs you.
One item on the list is still live, and we disagree about it. Cole Bittel’s read is that env0 settled the problem by licensing from HashiCorp, so you can run Terraform there again. Andrey’s read is that the automation platforms still push you onto OpenTofu. The env0 documentation sides with Andrey: its version page offers Terraform up to 1.5.x and warns that “Terraform versions 1.6.0 and higher are under a BSL license and are not supported”. Treat that as one platform’s policy, not a rule, and check the one you’re on.
Greenfield is the easy case, because the migration cost is zero. Cole would start a new project on OpenTofu without much hesitation. We’d run the experiment: build it on tofu and see what the last two percent looks like when nothing is at stake.
What this means for teams
The decision isn’t Terraform against OpenTofu in the abstract. It’s which of the differences above touches the repository in front of you, and most teams can answer that in an afternoon.
Four things worth doing this week:
- Grep a production state file for secrets. If any turn up, pick a side on purpose: state encryption on OpenTofu, or an ephemeral source feeding write-only arguments on Terraform.
- Count the directories that exist only to hold a hardcoded backend block. If that’s your layout, try partial configuration with
-backend-configon one stack, or OpenTofu’s early evaluation, before anyone proposes Terragrunt. - Check which binaries your hosted runner will install for you, and whether a self-hosted runner would lift the limit. Read the supported-versions page before you argue about features.
- On the next greenfield repository, run
tofu initinstead and keep notes on what breaks. That’s cheaper than forming an opinion from release posts.
Common questions, answered
How do I use a different state bucket per environment without duplicating code?
Leave the backend block empty and pass its keys at init time: tofu init -backend-config=bucket=... -backend-config=key=..., from a wrapper script that knows the values per environment. Terraform calls this partial configuration; it is less machinery than Terragrunt.
On OpenTofu 1.8 and later you can put a variable in the backend block instead, as long as it doesn’t depend on a resource, data source or module output. In CI, pass it to tofu init with -var or -var-file: nobody is there to answer a prompt.
How do I stop someone reading a database password out of my state file?
On Terraform 1.11 or later, keep it out of state end to end: read it with an ephemeral resource or variable and feed that into a write-only argument such as password_wo on aws_db_instance, paired with password_wo_version so Terraform knows when it changed. Keep that version a plain integer you bump yourself: a timestamp makes every run show a change, and anything derived from the secret is ephemeral too, which the persisted version argument won’t accept.
On OpenTofu, as of September 2025, the password still lands in state and encryption is what protects it: a KMS key makes the state and plan files unreadable, but it won’t help if you lose the key, and it hides nothing from whoever runs tofu.
Can I run the latest Terraform on a hosted IaC platform?
Read the platform’s supported-versions page first, because the licence changed what some of them will install. env0 offers Terraform up to 1.5.x and warns that “Terraform versions 1.6.0 and higher are under a BSL license and are not supported”.
That limit is about the binary the platform hands you, not what you may run: the internal-use carve-out still covers Terraform on your own runner.
Related episodes
- Episode 54, HashiCorp’s BSL Move and OpenTF is where this started, recorded weeks after the licence change, when the fork repository had just gone public and the first alpha was still ahead of it.
- Episode 64, From Terraform to OpenTofu: Story From the Trenches is Timur Bublik’s migration at scale, across 250 to 300 stacks, where the binary swap was the easy half and cleaning up the already-broken stacks was the real work.
- Episode 43, Terraform 1.0 to 1.3.0: One Year in Review covers the state file problem years before either tool had an answer for it.
Resources
- OpenTofu 1.10 state and plan encryption documentation settles which key providers existed, what is encrypted, and what encryption does not protect against.
- Migrating from Terraform 1.5.x or lower, OpenTofu settles the migration procedure, the
1.5.7prerequisite, the state backup step and the rollback path. - Linux Foundation launches OpenTofu settles the September 2023 launch, the backing companies and the 18 full-time developer commitment.
- HashiCorp updates licensing FAQ based on community questions settles what counts as a competitive offering, and that internal use is not one.
- Use temporary write-only arguments, Terraform 1.11 documentation settles how a write-only argument and its version argument work together, and that Terraform keeps the version in state.
- Terraform backend configuration documentation settles the rule that a backend block can’t refer to named values, and documents partial configuration with
-backend-config. - Cole Bittel’s OpenTofu pull requests settle what he has contributed, including the merged target and exclude files change; he is also on LinkedIn.
Since we recorded
OpenTofu 1.11.0, released on 9 December 2025, added ephemeral values and write-only attributes, so one binary now offers both state encryption and the keep-it-out-of-state approach, and the choice between them is a design decision rather than a tool decision. Terraform Stacks left beta at HashiConf 2025 and is generally available on HCP Terraform plans based on resources under management, so its provider iteration is no longer a preview feature. We went back to the whole question about a month after this episode’s release, in episode 85, Is It Time for OpenTofu?, written off HashiConf 2025, where the argument had moved from licensing onto how much of each Terraform release reaches the free binary at all. The longer view, including whether any of this survives contact with AI-written infrastructure, is in episode 101, Infrastructure as Code in 2026.
