Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.
Terraform is a key product of IaC tools in cloud computing. It is the core product of HashiCorp, a company with four core products including Nomad, Consul, Vault and Terraform, also known as Consul. Terraform is responsible for creating a consistent infrastructure across different cloud platforms and maintaining and managing its state throughout its life cycle.
According to its website, Terraform is an open source infrastructure-as-code software tool that provides a consistent CLI workflow to manage hundreds of cloud services.
In order to experience this product, let’s install it first.
For Ubuntu users:
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install -y terraform
Copy the code
For CentOS users (I installed it based on this, no problem) :
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum -y install terraform
Copy the code
For Mac users:
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
Copy the code
Choco is the recommended package manager for Windows users. Go to Chocolatey.org/, download and install Chocolatey, start PowerShell as an administrator, and then:
choco install terraform
Copy the code
If you want to install it manually, go to the Terraform website and download the corresponding operating system executable (Terraform is written in Go and has only one executable), unzip it to the specified location, and configure the environment variable PATH to include the directory in which Terraform is located.
Once the installation is successful, let’s verify it.