Skip to main content

Actions Status

terraenv

terraenv

Terraform & Terragrunt version manager inspired by rbenv, tfenv, tgenv

Support

Currently terraenv supports the following Operating System

  • Mac OS X (64bit)
  • Linux (64bit)

Installation

Automatic

Install via Homebrew on OSx

$ brew tap aaratn/terraenv
$ brew install terraenv

Install via Python pip

$ pip install terraenv

Upgrade

via Homebrew on OSx

$ brew upgrade terraenv

Manual on Linux And OSX

  1. Download terraenv for your operating system

Linux

$ wget https://github.com/aaratn/terraenv/releases/latest/download/terraenv_linux_x64.tar.gz

OSX

$ wget https://github.com/aaratn/terraenv/releases/latest/download/terraenv_osx_x64.tar.gz
  1. Extract Tar Archive

Linux

$ tar -xvzf terraenv_linux_x64.tar.gz

OSX

$ tar -xvzf terraenv_osx_x64.tar.gz
  1. Copy the extracted file to your /usr/local/bin directory
$ cp terraenv /usr/local/bin/terraenv

On Ubuntu/Debian touching /usr/local/bin might require sudo access

Usage

terraenv <terraform / terragrunt > install [version]

Install a specific version of Terraform. Available options for version:

  • 1.2.3 exact version to install
  • latest installs latest version
$ terraenv terraform install 0.12.15
$ terraenv terragrunt install 0.21.6
$ terraenv terraform install latest
$ terraenv terragrunt install latest

terraenv < terraform / terragrunt > list remote

.terraenv

If you use a .terraenv, terraenv <terraform / terragrunt > install (no argument) will install the version written in it.

terraenv <terraform/terragrunt> use <version>

Switch a version to use

$ terraenv terraform use 0.11.14
$ terraenv terragrunt use 0.21.6

terraenv uninstall <terraform/terragrunt> <version>

Uninstall a specific version of Terraform

$ terraenv terraform uninstall 0.12.15
$ terraenv terragrunt uninstall 0.21.5

terraenv <terraform/terragrunt> list local

List installed versions

% terraenv terraform list local
0.12
0.11.13
0.11.14
0.12.11
0.12.0
0.12.12
0.12.13
% terraenv terragrunt list local
0.18.7
0.21.6

terraenv <terraform/terragrunt> list remote

List installable versions

% terraenv terraform list remote
...
0.11.3
0.11.4
0.11.5
0.11.6
0.11.7
0.11.8
0.11.9
0.11.10
0.11.11
0.11.12
0.11.13
0.11.14
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.12.6
0.12.7
0.12.8
0.12.9
0.12.10
0.12.11
0.12.12
0.12.13
0.12.14
0.12.15

.terraenv file

If you put a .terraenv file on your project root, terraenv detects it and uses the version written in it.

$ cat .terraenv
TERRAFORM=0.12.15
TERRAGRUNT=0.21.6

$ terraenv terraform install

$ terraform -version
Terraform v0.12.15

$ terraenv terragrunt install

$ terragrunt -version
terragrunt version v0.21.6

To use Terraform or Terragrunt version from `.terraenv` file present at your current directory path.

$ terraenv terraform use

$ terraenv terragrunt use

LICENSE

Inspiration

Metadata

Release files for terraenv 0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for terraenv 0.12
File Interpreter ABI Platform Actions
terraenv-0.12-py3-none-any.whl Python 3 none any Details for terraenv-0.12-py3-none-any.whl

Release files / terraenv-0.12-py3-none-any.whl

Download URL terraenv-0.12-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
778ee88709701ef58bd72fbac602baf32a6852ffcd6a3908fab8efc0f0deeb54
BLAKE2b-256 checksum
How to use checksums
c66b607eda9b567041723fb8734ac53fbc13b32070d99d9dd71b71519ddc60ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.6.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

Security for terraenv 0.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page