tfutils / tfenv

Terraform version manager
MIT License
4.42k stars 446 forks source link

Future Improvement/Feature Request: OpenTF/OpenTofu #409

Closed huang-jy closed 6 months ago

huang-jy commented 10 months ago

ICYMI, Hashcorp have changed their license to BSL and this has concerned a lot of companies (ours included): https://opentf.org/announcement

An initiative "OpenTF Foundation" has sprung up and is in the process of creating a fork and repos of Terraform (named "OpenTF"). Whilst still early days yet, it would be great if tfenv could support selecting their versions as well as Hashicorp's versions, to support those who haven't migrated off older versions of terraform and onto OpenTF or an alternative.

dmerrick commented 10 months ago

As of today the fork is now live

skyzyx commented 10 months ago

No release yet. IMO, we should wait for a release before adding support.

huang-jy commented 9 months ago

Amending title to reflect naming change of the project

idealo-ricardo-band commented 9 months ago

Can't wait to use tfenv to switch to opentofu.

joshpollara commented 9 months ago

We have a branch ready to go that adds OpenTofu support to tfenv. Once an OpenTofu release is available then we'll have a PR for tfenv. Shouldn't be too much longer!

thpang commented 9 months ago

First release is active ;) - https://github.com/opentofu/opentofu/releases

joshpollara commented 9 months ago

Yep. Still need to wrap things up with docs, terraform references, the tofu remote URL, signing key, etc. Will finish up today/tomorrow and PR soon! Thanks for being patient.

joshpollara commented 9 months ago

https://github.com/tfutils/tfenv/pull/411

Zordrak commented 6 months ago

We have reviewed this request and the associated PR in detail and given the question a lot of thought. In conclusion we do not believe this is an appropriate course of action.

The changes needed, as demonstrated in the PR, show that the inclusion of support for OpenTofu is not a minor case switch. It would be the wholesale adoption of an entirely new binary. This binary does its own thing, has its own release process and governance, and by design has no guaranteed or even implied contract to continue to be released and versioned in the same way as the terraform binary. An immediately obvious example of this is the hashicorp support for keybase that is not mentioned or accounted for in the OpenTofu work. Additionally a huge amount of work has gone into wrapping inconsistencies in the Hashicorp release management that would not apply consistently with any other tool.

We believe that incorporating OpenTofu would be equivalent to incorporating the Hashicorp Packer binary, converting tfenv into a generic "binaryenv"; except that at least in the case of Packer, there would be reasonable expectation for future release processes and signing mechanisms to remain in line with Terraform.

We believe that as an independent tool, OpenTofu needs its own versioning solution bespoke to its usage. If tfenv is desired as an approach for working with OpenTofu development, it ought to be forked to create "tofuenv", supported and managed by whomever is responsible for the OpenTofu release management mechanisms. tfenv is MIT-licenced and so this should not be a barrier for tofuenv.

We had hoped that Hashicorp would take more direct interest in superseding tfenv with their own versioning manager, written in Go, that implements the same features - or at least the same capabilities - but this has not yet happened.

In conclusion, the PR will be rejected as tfenv does not intend to directly support OpenTofu as an independent binary, but we wish you well in your endeavours.

huang-jy commented 6 months ago

As OP of this issue, I appreciate you taking the time to explain your reasoning behind the decision. I am, obviously, disappointed with that decision, but I do respect it.

For those, like me, who wanted to use tfenv to switch terraform versions, including opentofu, we now have a decision to make as to whether or not to continue using tfenv or not based on Hashicorp's actions.

Since tfenv will not add opentofu, it's likely other tools will be used instead of it -- asdf for example, already provides plugins for both terraform and opentofu so I guess users will be migrating from tfenv to asdf (or similar tools) instead.

kvendingoldo commented 6 months ago

Hello there, Tofuenv's first stable release (v1.0) is now available! tofuenv is a fork of tfenv that only works with OpenTofu binaries. Our crew (me, @anastasiiakozlova245, @Nmishin) has been working on the fork over the past week. We worked hard to improve the usability of core tofuenv features, add some new capabilities, and, of course, fix a few bugs in the original tfenv program.

We'd appreciate your input and support on GitHub. Please feel free to submit issues and make contributions. Link to tofuenv: https://github.com/tofuutils/tofuenv

tofuenv can be installed manually from GitHub or via brew (for mac users).

kvendingoldo commented 5 months ago

Hi folks, The tofuutils crew is dropping new tool for managing Terraform/OpenTofu: tenv!

tenv, is Golang based application, that means that you don't depend on shell or other environment dependencies anymore.

We encourage you to make use of it, share any issues you encounter, and even contribute to its improvement. Your support and stars ⭐️ would be greatly appreciated! We're all ears for your feedback!

We saved all tfenv features and added some new. It's an active, not dead development. We'll be glad to hear your wishes about new features and implement them in next releases.