Install Terrraform
Refer this article to understand the terms - Infrastructure As Code(IaC), Orchestration, Provisioning & Configuration Management
What is Terraform?
Terraform is an open-source infrastructure as code, software tool created by HashiCorp. It enables users to define and provision data center infrastructure using a declarative configuration language known as HashiCorp Configuration Language (HCL), or optionally JSON.
Terraform is a tool that allows programmers to build, change, and version infrastructure safely and efficiently.
Terraform’s main job is to create, modify, and destroy servers and other resources.
Terraform does not configure servers software. Configuring software can be performed with scripts, configuration management tools or container deployments.
The basic workflow when using Terraform is:
- Write the configuration files on your computer in which you declare the elements of your infrastructure that you want to create.
- Tell Terraform to analyze your configurations and then create the corresponding infrastructure.
In this article we will learn how to install Devops Infrastructure as code tool Terraform on CentOS 7
Pre-requisites
- VM/Server with CentOS 7 installed
- Internet connection to download Terraform installer package
- Depending on your Operating System, you can choose the terrafrom installer from download page of terraform.io
Access the link -> https://www.terraform.io/downloads.html and download the installer.
In our case and in this article we will use Linux installer.
Use wget, download the Terraform -
[root@devops ~]# hostname devops.example.com
[root@devops ~]# wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip
Unzip and copy it in /usr/local/bin
[root@devops ~]# unzip terraform_0.12.24_linux_amd64.zip
Archive: terraform_0.12.24_linux_amd64.zip
inflating: terraform
[root@devops ~]# cp terraform /usr/local/bin/
[root@devops ~]# which terraform
/usr/local/bin/terraform
[root@devops ~]# terraform -v
Terraform v0.12.24
Conclusion:
In this article we learned how to install Terraform on Linux Operating System - CentOS 7