Open joeypiccola opened 1 year ago
tfenv use
switches to using the latest version that's already installed. If you tfenv install latest
, 1.3.3 (now) should be installed, and then tfenv use latest
will switch to that.
It seems this is inconsistent with other tfenv use
invocations though - e.g. having install
ed and use
d 1.3.3 if I now tfenv use 1.3.2
(which I hadn't previously installed) it installs it automatically before switching to it.
I'm trying this:
echo "terraform {
required_version = \"~> 1.1.0\"
}" > latest_allowed.tf;
> tfenv use latest-allowed
No installed versions of terraform matched 'latest-allowed:^latest-allowed$'. Trying to install a matching version since TFENV_AUTO_INSTALL=true
No versions matching 'latest-allowed' found in remote
Installing a matching version failed
> tfenv
tfenv 3.0.0
Any tips?
@OJFord Good catch on tfenv install
, I hadn't used that command before. For my purposes in my CI\CD process if a user supplied latest
I will simply run tfenv install latest
and then tfenv use latest
. Thank you.
Was hoping to simply run
tfenv use latest
to get the latest version of Terraform installed, however it keeps the version at1.3.1
. Sure I can work around this by typingtfenv use 1.3.2
, but I am curious what's the expected behavior. FWIW,list-remote
lists the latest but it doesn't install it. In my scenario neither.terraform-version
orTFENV_TERRAFORM_VERSION
are in place. Thanks!