Created
March 19, 2020 03:56
-
-
Save sho-luv/f04df99371c5eed0ecae59230feab270 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# download latest version of terraform: | |
TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \"\,\v | awk '{$1=$1};1'` | |
wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip | |
# unzip downloaded terraform: | |
unzip terraform_${TER_VER}_linux_amd64.zip | |
# delete zip file | |
rm unzip terraform_${TER_VER}_linux_amd64.zip | |
# move terraform to my path: | |
sudo mv terraform /usr/local/bin/ | |
# check that its in the path | |
which terraform | |
# check what version was installed | |
terraform -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment