Getting started with Terraform

In this book, we will focus on open-source Terraform. We will be demonstrating the complete Terraform setup on the CentOS 7.x machine that we used in the previous chapters. HashiCorp does not provide native packages for operating systems, so Terraform is distributed as a single binary, packaged inside a ZIP archive.

Let's set up Terraform on our CentOS server. Follow these steps:

  1. We have to download the Terraform binaries from the official website: https://www.terraform.io/downloads.html. In our case, we will be using Linux 64-bit:

  1. Unzip the extracted Terraform .zip file. You need to install the unzip package if it is not already present:

$ yum -y install unzip
$ echo $PATH
$ unzip terraform_0.11.8_linux_amd64.zip -d /usr/bin/

This will extract the Terraform binary to the /usr/bin, which is available in the PATH environment variable for your Linux systems.

  1. Finally, check the installed version of Terraform. The latest version of Terraform software available at the time of writing is the following:

$ terraform -v
Terraform v0.11.8

As you can observe, setting up Terraform takes just a matter of minutes and it has very lightweight binaries. We are now all set to use the Terraform environment for AWS service provisioning.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.55.136