Support falling back to tofu
binary if terraform
is not found but tofu
is (And maybe allow the fallback to be an environment variable)
#159
Labels
type/enhancement
New feature or request
SUMMARY
As OpenTofu and Terraform both should work for this collection, I think it would be a good idea to fall back to
tofu
if it is found andterraform
is notISSUE TYPE
COMPONENT NAME
The inventory provider, all modules and the lookup provider
ADDITIONAL INFORMATION
OpenTofu is getting more popular, and it's compatible with Terraform. People should be able to use OpenTofu instead of Terraform without needing to hardcode the binary path in the inventory file/tasks.
Alternatively, or both, an environment variable could be used to get the Terraform/Tofu binary path. This would not break any deployments, as the hardcoded path in the task/inventory would still take precedent.
My proposed search order is as follows:
TF_BINARY_PATH
maybe? Open to suggestions)terraform
in pathtofu
in pathThis would not break any existing deployments, as the set variable and Terraform still take precedent over Tofu, and the environment variable wouldn't be set.
If this sounds like something that would be accepted, I can make a PR for it
The text was updated successfully, but these errors were encountered: