I think something changed with Hashicorp's website that's making automatic downloads fail.
Observations
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
wget also fails with the same URL (https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_darwin_arm64.zip)
opening my browser at that URL displays an errror <Code>NoSuchKey</Code><Message>The specified key does not exist.</Message>
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.
I think something changed with Hashicorp's website that's making automatic downloads fail.
Observations
tfenv displays the error
wget also fails with the same URL (
https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_darwin_arm64.zip
)opening my browser at that URL displays an errror
<Code>NoSuchKey</Code><Message>The specified key does not exist.</Message>
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.