OpenTofu Support #315 #434
Replies: 8 comments 16 replies
-
@MatthewJohn suggestion/thoughts from email thread: I've been thinking about the OpenTofu support: #315 It seems that OpenTofu now has a static site containing release information, if we didn't want to start using the Github API: https://get.opentofu.org/tofu/. I'd be happy to take a look - but my main concern would be how to add the logic and retaining compatibility with external library usage:
I'm wondering if installDir (https://github.com/warrensbox/terraform-switcher/blob/master/lib/defaults.go#L31) could be used to toggle the directory for Terraform vs OpenTofu (and thus installed versions and GPG key could be kept independent). Then perhaps a flag for --distribution for terraform or opentofu could be added? (I know there's plenty of other things that will come out of the woods when starting to implement, though!) |
Beta Was this translation helpful? Give feedback.
-
@yermulnik suggestion/thoughts from email thread: OpenTofu support would be really great. We can take into account groundwork that has been already done by https://github.com/tofuutils/tenv in this direction. |
Beta Was this translation helpful? Give feedback.
-
@MatrixCrawler suggestion/thoughts from email thread: i second that openTofu support. Oh and regarding the usage of our code in other projects: maybe we should expose some of our functions as kind of API in an explicit package for reusage (we will obviously use it ourselves) |
Beta Was this translation helpful? Give feedback.
-
@crablab suggestion/thoughts from email thread: I agree with the previous comments - I would like to see (and would be happy to contribute) towards Open Tofu support :) |
Beta Was this translation helpful? Give feedback.
-
This is what've I have gathered: Considerations
|
Beta Was this translation helpful? Give feedback.
-
Having started doing some work in #435, though getting the versions is working fine, for the download URL, I see some issues:
I can see two ways around this:
For the second option (downloadmirror), since the github URLs contain two instances of the version (so the formatting is a bit off), plus the fact that we still need to pass around the name of the application (for the binary, zip name etc. etc.), I wondering about suggesting the following (and this is quite a bit of re-architecting):
The main reason is that I think we're using the name terraform (and inherently using this in places where OpenTofu might differ considerably |
Beta Was this translation helpful? Give feedback.
-
Little update - #435 is getting there, is mostly working (except for GPG verification - for some reason opengpg doesn't like their key/sig files - but hopefully it won't be too difficult to work out. Treat this as a demo - I won't update any tests at the moment until this design has been reviewed :) Thanks all! |
Beta Was this translation helpful? Give feedback.
-
@MatthewJohn I might be totally wrong on this topic, can |
Beta Was this translation helpful? Give feedback.
-
Discussion related to using tfswitch to download binaries from OpenTofu
Beta Was this translation helpful? Give feedback.
All reactions