tfutils / tfenv

Terraform version manager
MIT License
4.55k stars 453 forks source link

download failling with 404 #437

Open g-- opened 2 hours ago

g-- commented 2 hours ago

I think something changed with Hashicorp's website that's making automatic downloads fail.

Observations

  1. tfenv displays the error

    Downloading release tarball from https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_darwin_arm64.zip
    curl: (56) The requested URL returned error: 404
    
    Tarball download failed
    /opt/homebrew/Cellar/tfenv/3.0.0/lib/tfenv-exec.sh: line 43: /opt/homebrew/Cellar/tfenv/3.0.0/versions/0.12.31/terraform: No such file or directory
  2. wget also fails with the same URL (https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_darwin_arm64.zip)

  3. opening my browser at that URL displays an errror <Code>NoSuchKey</Code><Message>The specified key does not exist.</Message>

  4. opening my browser at this page first and clicking on the terraform_0.12.31_darwin_arm64.zip link succeeds. Note the URL for that link is the same as tfenv uses.

workaround

Anyone having this problem, my work around is to download the binaries from hashicorp in a browser and unzip it where tfenv looks for it. Eg. with homebrew, that's /opt/homebrew/Cellar/tfenv/3.0.0/versions/<version number>.

Possible fixes

I haven't looked the differences between clicking on the link and going directly so I don't have any suggestions on fixes. My priority here is to document that it's happening so there's a place to discuss.

g-- commented 2 hours ago

I want to shout out to the tfenv maintainers: thank you for your work, it makes maintaining multiple tf repos so much easier!