Terraform is an automated open source infrastructure tool created by HashiCorp. It is written in the Go programming language. It allows you to define and describe your infrastructure as code in configuration files with a declarative language and to distribute and manage that infrastructure in various public cloud providers such as AWS, GCP, Azure, etc.
The basic workflow when using Terraform is: [1
2. Ask Terraform to analyze your configurations and then create the corresponding infrastructure.
This tutorial explains how to install Terraform on Ubuntu 18.04.
Terraform is very easy to install. You can download Terraform from Terraform download page . Choose the appropriate package for your operating system and architecture, unzip the archive and move the binary to a directory that is part of your PATH variable.
First create ~ / bin directory:
mkdir ~ / bin
On Ubuntu, if you create this directory it is automatically added to your PATH.
Then download the zip archive. Visit the Terraform download page for the latest version to download.
wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zipebrit19659009??Unzip archive. The archive will extract a single binary called
terraformbinary to a directory included in the system's
PATHin our case it is
~ / bindirectory.
etc. terraform ~ / bin
To check if Terraform is installed, run:
# Terraform v0.12.24
The best place to learn how to use Terraform, distribute and manage your infrastructure is Terraform docs. There are many suppliers you can handle with it.