How To

How To Install Terraform on Ubuntu / Debian / CentOS / Fedora / Arch Linux

(: September 20, 2019) This guide will walk you through the steps to install Terraform on Ubuntu / Debian / CentOS /...

Written by SXI ADMIN · 50 sec read >

(: September 20, 2019)

This guide will walk you through the steps to install Terraform on Ubuntu / Debian / CentOS / Fedora / Arch Linux. Terraform is a cloud-agnostic Infrastructure automation tool used to manage cloud and on-premise resources. With it you can build, change, and version infrastructure deployed on popular service providers.

How to Install Terraform on Linux

Terraform is distributed as a tarball on Github. Check the latest release on Terraform releases page before downloading below.

export TER_VER="0.12.9"
wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip

Once the archive is downloaded, extract and move terraform binary file to the /usr/local/bin directory.

.td_uid_2_5d909860e1718_rand.td-a-rec-img{text-align:left}.td_uid_2_5d909860e1718_rand.td-a-rec-img img{margin:0 auto 0 0}
$ unzip terraform_${TER_VER}_linux_amd64.zip
Archive:  terraform_0.12.9_linux_amd64.zip
 inflating: terraform

$ sudo mv terraform /usr/local/bin/

This will make the tool accessible to all user accounts.

$ which terraform
/usr/local/bin/terraform

Check the version of Terraform installed

$ terraform -v
Terraform v0.12.9

To update Terraform on Linux, download the latest release and use the same process to extract and move binary file to location in your PATH.

Also check:

How to Provision VMs on KVM with Terraform

Deploy VM Instances on Hetzner Cloud with Terraform

Build AWS EC2 Machine Images (AMI) With Packer and Ansible

.td_uid_4_5d909860e1915_rand.td-a-rec-img{text-align:left}.td_uid_4_5d909860e1915_rand.td-a-rec-img img{margin:0 auto 0 0}

How to Install RabbitMQ on CentOS 7

SXI ADMIN in How To
  ·   1 min read