tofuutils / tenv

OpenTofu / Terraform / Terragrunt and Atmos version manager
https://tofuutils.github.io/tenv/
Apache License 2.0
662 stars 32 forks source link

Support of plain HTTP proxy #138

Closed kvendingoldo closed 4 months ago

kvendingoldo commented 4 months ago

Describe the solution you'd like tfswitch support --mirror command that can be used with local proxy. E.g.: ["tfswitch", "--mirror", "https://localhost-archive/mirror/terraform", "--bin", f"{os.getcwd()}/bin/terraform"]

Looks like that it should work via TFENV_REMOTE, but we have to check HTTP compatibility.

kvendingoldo commented 4 months ago

Found in https://github.com/MatthewJohn/terrareg/issues/42

dvaumoron commented 4 months ago

Setting a value for on of the <TOOL>_REMOTE env var change the behavior of tenv, because it is considered that the user will access an http proxy to download artifact.

However tenv still call api (github or hashicorp) to list those artifact. do you think it would be better to change the default proxy mode ? (list from the proxy when <TOOL>_LIST_MODE is not forced to "api")

kvendingoldo commented 4 months ago

I think yes, it's more obvious way. WDYT?

dvaumoron commented 4 months ago

Ok