Thursday, 10 October 2024
Application

How To Install Terraform on CentOS 8

In this article I will guide you on how to install terraform on CentOS 8 / RHEL 8


Terraform
Use Infrastructure as Code to provision and manage any cloud, infrastructure, or service Terraform allows you build, change, and version infrastructure deployed on popular cloud environments and on premise .

Install Terraform on CentOS 8
Please note that before get started ensure you have privileged to install and configured the system with a sudo user that will be used to install Terraform on CentOS.

Step 1: Install wget,wget command to download the latest binary archive of Terraform.

sudo dnf -y install wget

Step 2: Install Terraform on CentOS 8 and download it via wget download binary archive file.

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

Extract the downloaded archive

unzip terraform_${TER_VER}_linux_amd64.zip
Archive: terraform_xxx_linux_amd64.zip
inflating: terraform

Then move the binary file to directory in your PATH.

sudo mv terraform /usr/local/bin/

Step 3: Confirm Terraform Installation on CentOS 8
Check the version of Terraform to validate our installation:

terraform -v
Terraform v0.13.2

You can then refer to some of the guides we have on using Terraform.

Post Comment