Skip to content

unable to set download mirror for opentofu #502

@frostydknight

Description

@frostydknight

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRefactor existing code for better performance and quality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions