Installs multiple versions of Terragrunt to ~/.terragrunt.versions
and allows fast switching between them similar
to what tfenv does for Terraform.
This is more recently updated than tgenv.
https://github.com/warrensbox/tgswitch?tab=readme-ov-file#installation
brew install warrensbox/tap/tgswitch
or
curl -L https://raw.githubusercontent.com/warrensbox/tgswitch/release/install.sh | bash
Will prompt to download a version of Terragrunt from a list of recent versions:
tgswitch
or install a specific version as an arg without the v
prefix:
tgswitch 0.39.2
using environment variable (put this in direnv's .envrc
):
export TG_VERSION=0.39.2
will now automatically download and switch to the above version:
tgswitch
Instead of an environment variable you can create a file .terragrunt-version
containing the version:
cat > .terragrunt-version <EOF
0.39.2
EOF
and then run tgswitch
in that directory to detect the version and switch.