Support for .tofu files for opentofu
enhancement
**Is your feature request related to a problem? Please describe.**
When using tfswitch with opentofu (TF_PRODUCT or --product) it will only work if the providers file has an `.tf` file ending. File ending `.tofu` is not supported.
**Describe the solution you'd like**
When using tfswitch with opentofu the filending `.tofu` should also be taken into account.
**Describe alternatives you've considered**
Since opentofu supports both file endings, the workaround is to use `providers.tf` instead of `providers.tofu`, even for opentofu projects.
**Additional context**
Why do i not use `.tf` for opentofu projects?
It should be best practice to use destinct file endings for terraform (`.tf`) and opentofu (`.tofu`) projects to prevent wrong tooling.
```sh
tfswitch Version: v1.13.0
```
关闭于 2026-02-10 2 条评论