In this recipe, we will learn how to install Terraform on a Linux machine using a script.
Getting ready
To complete this recipe, the only prerequisites are that you are running a Linux operating system and that you have an unzip utility installed. The gpg, curl, and shasum tools must be installed; they are often installed by default on all Linux distributions.
How to do it…
Perform the following steps:
- Open a command-line terminal and execute the following script:
TERRAFORM_VERSION="0.12.29"
curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_SHA256SUMS \
&& curl https://keybase.io/hashicorp/pgp_keys.asc | gpg --import \
&& curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_SHA256SUMS...