Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to set download mirror for opentofu #502

Open
frostydknight opened this issue Aug 30, 2024 · 2 comments
Open

unable to set download mirror for opentofu #502

frostydknight opened this issue Aug 30, 2024 · 2 comments
Assignees
Labels
enhancement Refactor existing code for better performance and quality

Comments

@frostydknight
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Hello, I've encountered an issue when attempting to setup a network mirror for terraform-switcher when using opentofu as my product. Namely, that it will use my mirror to get the version list, but it will not respect my mirror for downloads.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I think I've identified this issue for this. I believe it ties back to how mirrors are set at the product level. For Terraform, it has only the one mirror property, but Opentofu has two mirror properties, one of which is nonadjustable to normal users. To verify it wasn't editable, I went through the parameters lib, and was unable to find any code that allowed for it's editing. It is also not present within the parameters struct. I lastly wanted to see where this download mirror property was being passed into the install property and that is occurring here.

I think two possible solutions could work to resolve this. Either a, making the mirror parameter overwrite the download mirror for tofu as well, or adding in a new parameter that will overwrite that value in the tofu product.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

While I'm pretty sure that I identified the issue, I could just be unaware of how to adjust or set that value at a config level, and if anyone who is more familiar with the code-base could help me identify how to do so that would be great.

Additional context
Add any other context or screenshots about the feature request here.

@frostydknight frostydknight added the enhancement Refactor existing code for better performance and quality label Aug 30, 2024
@MatthewJohn
Copy link
Collaborator

Hey @frostydknight,

Sorry, yes, this was known when adding the OpenTofu support, the mirror is outright ignored for OpenTofu... the most important thing was not breaking Terraform (with regards to the mirror, at least)..
The fact that OpenTofu then requires two endpoints was less than ideal.
I agree that having two mirror URLs would make sense.. but making it less confusing for Terraform users would be important.

@warrensbox
Copy link
Owner

I agree with @MatthewJohn as well:

The fact that OpenTofu then requires two endpoints was less than ideal.
I am open to anyone here suggesting an elegant solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refactor existing code for better performance and quality
Projects
None yet
Development

No branches or pull requests

3 participants