Skip to content

Instantly share code, notes, and snippets.

@vasyakrg
Created July 20, 2019 07:22
Show Gist options
  • Select an option

  • Save vasyakrg/689eec3719b910def6f12f9ac955f86b to your computer and use it in GitHub Desktop.

Select an option

Save vasyakrg/689eec3719b910def6f12f9ac955f86b to your computer and use it in GitHub Desktop.
PATH="${HOME}/bin"
TMPDIR="${TMPDIR:-/tmp}"
VERSION="0.11.11"
if ! terraform version ; then
mkdir -p "${HOME}/bin"
pushd "${TMPDIR}" ;
curl -sSL
-o terraform.zip
"https://releases.hashicorp.com/terraform/${VERSION}/terraform_${VERSION}_linux_amd64.zip" ;
unzip terraform.zip ;
mv -v terraform "${HOME}/bin/terraform" ;
chmod +x "${HOME}/bin/terraform" ;
popd ;
terraform version ;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment