Skip to content

Instantly share code, notes, and snippets.

@LozanoMatheus
Created February 17, 2021 19:36
Show Gist options
  • Save LozanoMatheus/c4818da400d8af936437c839afce3e12 to your computer and use it in GitHub Desktop.
Save LozanoMatheus/c4818da400d8af936437c839afce3e12 to your computer and use it in GitHub Desktop.
How to switch between runtime versions on Bash, Zsh or Fish
## Install
asdf plugin add terraform
asdf install terraform 0.13.0
asdf install terraform 0.14.7
asdf install terraform 0.12.29
##
## Command
terraform version
##
## Output
No version set for command terraform
Consider adding one of the following versions in your config file at /tmp/.tool-versions
terraform 0.12.20
terraform 0.12.23
terraform 0.12.24
terraform 0.11.14
terraform 0.12.29
terraform 0.13.0
terraform 0.14.7
##
## Command
asdf local terraform 0.13.0
terraform version
##
## Output
Your version of Terraform is out of date! The latest version
is 0.14.7. You can update by downloading from https://www.terraform.io/downloads.html
Terraform v0.13.0
##
## Command
cd ..
asdf global terraform 0.14.7
terraform version
##
## Output
Terraform v0.14.7
##
## Command
asdf shell terraform 0.12.29
terraform version
##
## Output
Terraform v0.12.29
Your version of Terraform is out of date! The latest version
is 0.14.7. You can update by downloading from https://www.terraform.io/downloads.html
##
## Command
declare -p | grep -i terraform
##
## Output
declare -x ASDF_TERRAFORM_VERSION="0.12.29"
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment