Skip to content
/ chtf Public

Install and manage multiple versions of terraform

Notifications You must be signed in to change notification settings

tapatoo/chtf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

chtf

Install and manage multiple versions of Hashicorp terraform.

Installation

Copy script to a directory in your $PATH, i.e. /usr/local/bin. Set permissions to allow execution:

sudo curl -o /usr/local/bin/chtf https://raw.githubusercontent.com/avolkov-dazn/chtf/master/chtf
chmod 0755 /usr/local/bin/chtf

Test by executing chtf in your favourite terminal emulator. You should see usage example come up:

$ chtf
Usage: chtf <version, i.e. 0.12.2>

Usage

The script takes terraform version as an argument. If the version does not exist locally it will download the version specified from Hashicorp release page. The sha256sum is verified and the binary is unpacked to /usr/local/bin with a version number appended. A symbolic link is then created.

If the binary already exists, a symbolic link will be changed.

You should see a confirmation of the version installed when the process is finished:

$ chtf 0.12.2
[sudo] password for user:
Terraform v0.12.2 - good to go

Sudo is required to operate on /usr/local/bin/.

About

Install and manage multiple versions of terraform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages