Problem
The infra domain picks terraform or tofu per directory by sniffing .terraform.lock.hcl (#294): a "tofu init" header or registry.opentofu.org providers means tofu. That's a heuristic. It misses directories with no lockfile yet (for example no providers, or not initialised), and it can't express a repo that deliberately wants one tool everywhere.
It surfaced in azrtydxb/azrty-infra: before #294, terraform validate failed with "Missing required provider" on a valid OpenTofu stack and blocked the commit gate.
Ask
Make the binary configurable per repository (optionally per directory), with the lockfile detection as the fallback when nothing is configured. For example, in procoder's repo config:
infra:
terraform_binary: tofu # terraform | tofu | auto (default)
procoder doctor / init should require and install whatever the config names.
Problem
The infra domain picks
terraformortofuper directory by sniffing.terraform.lock.hcl(#294): a"tofu init"header orregistry.opentofu.orgproviders meanstofu. That's a heuristic. It misses directories with no lockfile yet (for example no providers, or not initialised), and it can't express a repo that deliberately wants one tool everywhere.It surfaced in
azrtydxb/azrty-infra: before #294,terraform validatefailed with "Missing required provider" on a valid OpenTofu stack and blocked the commit gate.Ask
Make the binary configurable per repository (optionally per directory), with the lockfile detection as the fallback when nothing is configured. For example, in procoder's repo config:
procoder doctor/initshould require and install whatever the config names.