Installing Terraform on CentOS 7 and Windows 10

Posted: January 4, 2018 in Amazon Web Services (AWS), AWS, Linux, terraform

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.

CentOS:

Download Terraform:

For current version check this page.

curl -O https://releases.hashicorp.com/terraform/0.12.20/terraform_0.12.20_linux_amd64.zip
Check where to unzip package:

Find out executable path
[root@localhost ja]# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
unzip terraform_0.12.20_linux_amd64.zip -d /usr/bin/

Verify Installation
[root@localhost ja]# terraform -v
Terraform v0.12.20

Terraform needs configuration file with tf extension in the directory we run them from. They don’t take files from subdirectories.
mkdir terraform-templates && cd terraform-templates
Create empty configuration file and apply it
touch template.tf
terraform apply

Capture.PNG

Windows 10:

Download package, extract terraform.exe to folder of you choice (i already had folder named kubernetes so i copied terraform.exe there)

Capture

In system variables click on Path-New-type C:\kubernets

Capture

Open command prompt and type terraform -v

 

Capture

Comments
  1. […] open template.tf file (created in previous post ) and add following […]

    Like

  2. Bishopolis says:

    If you’re a fan of packages, for all the obvious benefits (verifiability, repeatability and consistency) we’ve had with them for 25 years, you may want to look at a terraform package.

    1) sudo yum install https://harbottle.gitlab.io/harbottle-main/7/x86_64/harbottle-main-release.rpm

    2) sudo yum install terraform

    3) miller time

    Hey, that’s free automatic updates, too. Fantastic! All without spray-painting files about the filesystem.

    Like

Leave a comment