plumber-cd / terraform-backend-git

Terraform HTTP Backend implementation that uses Git repository as storage
Apache License 2.0
208 stars 21 forks source link

Support for OpenTOFU #44

Open dantefromhell opened 11 months ago

dantefromhell commented 11 months ago

Will this project be able to support OpenTOFU as a replacement for the official TerraForm?

dee-kryvenko commented 11 months ago

I think it is already although I never tested it. Standalone mode doesn't care what makes requests to it, as long as they haven't changed the API for the http backend - it will work. Wrapper mode always had --tf as well as wrapper.tf.bin option to customize path/command it is using. It is meant for things like tfenv but I suppose it should work just fine for opentofu. If opentofu consider pluggable backends support, which Hashicorp been refusing to do for ages, we can make it work even better than it ever could for Hashicorp's Terraform. But I personally making no commitments yet. I am still wondering what the future is for both tf and opentofu and whether it is worth investing any more time into either. In the meantime I am exploring some cool new alternatives such as Crossplane.

kvendingoldo commented 7 months ago

At this moment if you need to have a support of Terraform as well as OpenTofu (and Terragrunt :) ) in one tool you can use https://github.com/tofuutils/tenv which my team wrote some months ago. A lot of users switched to that tool to unify version management in the world of Terraform.

You're welcome to open any issues or contribute to tenv.

thehale commented 7 months ago

I actively use this tool with OpenTofu by simply renaming the tofu binary to terraform.

For example,

mv $(which tofu) /usr/bin/terraform
dee-kryvenko commented 7 months ago

@thehale you can also use --tf or wrapper.tf.bin to give it a path to open tofu. Again, I have not yet tried that myself, but that option existed in the backend long before opentofu.