Unable to install the latest rev with tfenv install latest
:
```
$ tfenv install latest
[INFO] Installing Terraform v0.12.0
[INFO] Downloading release tarball from https://releases.hashicorp.com/terraform/0.12.0/terraform_0.12.0_darwin_amd64.zip
curl: (22) The requested URL returned error: 403
tfenv: tfenv-install: [ERROR] Tarball download failed
$ curl https://releases.hashicorp.com/terraform/0.12.0/terraform_0.12.0_darwin_amd64.zip
It's because 0.12.0 does not exist
$ tfenv list-remote
0.12.0-alpha1
...
I have make PR for this : #94
But currently unit tests are KO :-( ...
I'm looking why.
If you look at the build history master has been failing for a few months:
@iamhsa Hi,
Thank you for working on this.
At the time of writing, terraform v0.12-alpha1 still has some features unimplemented, it has many bugs, and it is not yet mature for general users to use it.
I think that it is very dangerous to install the alpha release with tfenv install latest
, not knowing what you are doing.
See current limitations:
https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md#0120-alpha1-october-19-2018
and reported issues:
https://github.com/hashicorp/terraform/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Av0.12-alpha1
But, it would be great for terraform contributors if we can install with tfenv install 0.12.0-alpha1
.
@minamijoyo Hi
Thanks for pointing this but I know the limitations on this version (it's an alpha), and you are right :
. it's dangerous
. it could be great to install it
Can we imagine something like :
tfenv install latest-stable
and latest for unstable.
or
tfenv install latest-unstable
and latest for stable
What do you think about that ?
@iamhsa
I prefer the following:
or simply
But it's a matter of UX, I will leave it to the maintainer as to what is the best.
Thanks!
Hi
I pushed one correction in unit tests #94 : as nobody use 0.1.0 or 0.2.0 versions I removed them in one unit test, because it's seems no longer compatible with some version of macos.
If this PR will be accepted a workaround for install the latest stable version can be :
tfenv install $(tfenv list-remote | grep -vE 'alpha|beta|rc' | head -n 1)
Regards
I'm apparently not getting the most recent list of available versions:
$ tfenv -v
tfenv 0.6.0
$ tfenv list-remote | head -3
0.12.0
0.11.10
0.11.9
@gudlyf
You get this output with the current version of tfenv ( 0.6.0 = master branch of this repo).
With PR #94 :
$ tfenv list-remote | head -3
0.12.0-alpha1
0.11.10
0.11.9
You can check unit tests : https://travis-ci.org/Zordrak/tfenv/jobs/447474311
I'm looking into this shortly. Bottom line is that latest should not be reporting alpha versions. It's normal to presume that when someone asks latest they will get the latest stable release.
The reason for the 403 on the 0.12 alphas is that for some reason the file names aren't as expected for the alphas e.g. terraform_0.12.0-alpha4_terraform_0.12.0-alpha4_linux_amd64.zip instead of terraform_0.12.0-alpha4_linux_amd64.zip
Certainly it would be valuable for someone to be able to install a 0.12 alpha by specifying it as a version, however this naming inconsistency makes me hesitant to hard code a case just for this scenario which may or may not be replicated in the future.
Step 1. Make latest stick to 0.11 stable
Step 2. Check validity of a case to handle 0.12
Step 3. ???
Step 4. Profit
Fixed by #102
Most helpful comment
@iamhsa Hi,
Thank you for working on this.
At the time of writing, terraform v0.12-alpha1 still has some features unimplemented, it has many bugs, and it is not yet mature for general users to use it.
I think that it is very dangerous to install the alpha release with
tfenv install latest
, not knowing what you are doing.See current limitations:
https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md#0120-alpha1-october-19-2018
and reported issues:
https://github.com/hashicorp/terraform/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Av0.12-alpha1
But, it would be great for terraform contributors if we can install with
tfenv install 0.12.0-alpha1
.