Installing my tooling with ASDF
Installing software with asdf
There are many package managers… but using asdf has a wide range tools that not that easy to find in brew and apt.
When I switch between Macos and Linux and upgrade my tooling on a regular basis plus I want to have full control of the versions I use, asdf is a great fit.
These are my notes after installing.
There are the steps I took to install terraform and awscli using asdf on Macos and Debian Linux.
Make sure asdf is installed and configured
Make sure you have asdf installed, and it is updated to at least 0.18.0. There were some breaking changes so you may need it reinstalling. Refer to the install asdf and configure asdf.
See the available plugins
Find your plugin for the software you want to install. Let us pick terraform.
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git
R https://github.com/asdf-community/asdf-r.git
aapt2 https://github.com/ronnnnn/asdf-aapt2.git
act https://github.com/gr1m0h/asdf-act.git
action-validator https://github.com/mpalmer/action-validator.git
actionlint https://github.com/crazy-matt/asdf-actionlint.git
adr-tools https://gitlab.com/td7x/asdf/adr-tools.git
ag https://github.com/koketani/asdf-ag.git
age https://github.com/threkk/asdf-ageFind the plugin from asdf-community
terraform https://github.com/asdf-community/asdf-hashicorp.gitAdd the plugin
No error means a successFind the version you are looking for
1.13.0
1.13.1
1.13.2
1.13.3
1.13.4
1.14.0Install the version you are looking for
Downloading terraform version 1.14.0 from https://releases.hashicorp.com/terraform/1.14.0/terraform_1.14.0_linux_amd64.zip
Verifying signatures and checksums
gpg: keybox '/tmp/asdf_terraform_fYMvpW/pubring.kbx' created
gpg: /tmp/asdf_terraform_fYMvpW/trustdb.gpg: trustdb created
gpg: key 34365D9472D7468F: public key "HashiCorp Security (hashicorp.com/security) <security@hashicorp.com>" imported
...
terraform_1.14.0_linux_amd64.zip: OK
Cleaning terraform previous binaries
Creating terraform bin directory
Extracting terraform archiveVersion is still not available
## Set the versionNo version is set for command terraform
Consider adding one of the following versions in your config file at /home/youruser/.tool-versions
terraform 1.14.0Set the version
No error means a successTerraform v1.14.0
on linux_amd64Install and use an older version in a directory
Since we may not alway want to use the latest version, we can install and use an older version in a specific directory and asdf will use it in this directory in future.
> asdf install terraform 1.13.4
Downloading terraform version 1.13.4 from https://releases.hashicorp.com/terraform/1.13.4/terraform_1.13.4_linux_amd64.zip
> asdf local terraform 1.13.4
> cd /tmp/
> terraform version
Terraform v1.14.0
> asdf set terraform 1.13.4
No error means a success
> terraform version
Terraform v1.13.4
on linux_amd64
Your version of Terraform is out of date! The latest version
is 1.14.0. You can update by downloading from https://developer.hashicorp.com/terraform/install
# All other directories now have the global version
> cd ~/
> terraform version
Terraform v1.14.0
on linux_amd64
```shell {filename="> asdf set -u terraform 1.13.4"}
No error means a successTerraform v1.14.0
on linux_amd64Now install aws cli
I have listed the steps as a single block.
> asdf plugin list all | grep asdf-community | grep awscli
No results...
> asdf plugin list all | grep awscli
awscli https://github.com/MetricMike/asdf-awscli.git
awscli-local https://github.com/paulo-ferraz-oliveira/asdf-awscli-local
> asdf plugin add awscli
...
2.32.4
2.32.5
2.32.6
> asdf install awscli 2.32.6
> asdf set -u awscli 2.32.6
> aws --version
aws-cli/2.32.6 Python/3.13.9 Linux/6.10.6+bpo-amd64 exe/x86_64.debian.12