This project was forked from old project cunymatthieu/tgenv. The intention here it's keep the project alive.
Terragrunt version manager inspired by tfenv project.
Currently tgenv supports the following OSes
- Mac OS X (64bit)
- Mac OS M1 (arm64)
- Linux (64bit)
Check out latest version of tgenv
$ git clone --depth 1 --branch main https://github.com/tgenv/tgenv.git ~/.tgenv
Or checkout tgenv at specific tag
$ git clone --depth 1 --branch v1.0.0 https://github.com/tgenv/tgenv.git ~/.tgenv
Add ~/.tgenv/bin
to your $PATH
any way you like
$ echo 'export PATH="$HOME/.tgenv/bin:$PATH"' >> ~/.bash_profile
OR you can make symlinks for tgenv/bin/*
scripts into a path that is already added to your $PATH
(e.g. /usr/local/bin
) OSX/Linux Only!
$ ln -s ~/.tgenv/bin/* /usr/local/bin
Add ~/.tgenv/bin
to your $PATH
any way you like
$ echo 'export PATH="$HOME/.tgenv/bin:$PATH"' >> ~/.zshrc
If you use Oh My Zsh, after export just run
$ omz reload
Install a specific version of terragrunt
latest
is a syntax to install latest version
latest:<regex>
is a syntax to install latest version matching regex (used by grep -e)
$ tgenv install 0.40.2
$ tgenv install latest
$ tgenv install latest:^0.9
If you use .terragrunt-version, tgenv install
(no argument) will install the version written in it.
Switch a version to use
latest
is a syntax to use the latest installed version
latest:<regex>
is a syntax to use latest installed version matching regex (used by grep -e)
$ tgenv use 0.40.2
$ tgenv use latest
$ tgenv use latest:^0.10
Uninstall a specific version of terragrunt
latest
is a syntax to uninstall latest version
latest:<regex>
is a syntax to uninstall latest version matching regex (used by grep -e)
$ tgenv uninstall 0.12.1
$ tgenv uninstall latest
$ tgenv uninstall latest:^0.9
List installed versions
% tgenv list
0.12.15
0.12.8
0.10.0
0.9.9
List installable versions
% tgenv list-remote
0.42.5
0.42.4
0.42.3
0.42.2
0.42.1
0.42.0
0.41.0
0.40.2
0.40.1
0.40.0
0.39.2
0.39.1
0.39.0
...
Upgrade the version of TGEnv software to latest version
$ tgenv upgrade
If you put .terragrunt-version
file on your project root, tgenv detects it and use the version written in it. If the version is latest
or latest:<regex>
, the latest matching version currently installed will be selected.
$ cat .terragrunt-version
0.9.9
$ terragrunt --version
terragrunt version v0.9.9
Your version of terragrunt is out of date! The latest version
is 0.7.3. You can update by downloading from www.terragrunt.io
$ echo 0.9.9 > .terragrunt-version
$ terragrunt --version
terragrunt v0.12.15
$ echo latest:^0.10 > .terragrunt-version
$ terragrunt --version
terragrunt v0.10.3
String (Default: true)
Should tgenv automatically install terragrunt if the version specified by defaults or a .terragrunt-version file is not currently installed.
TGENV_AUTO_INSTALL=false terragrunt plan
Integer (Default: "")
Set the debug level for TGENV.
- unset/empty-string: No debug output
- set: Bash execution tracing
Just run:
$ rm -rf /some/path/to/tgenv
And delete the previous export $PATH
.
The uninstall command is under development.
- tgenv itself
- tfenv : tfenv mainly uses tfenv's source code