This article discusses what Terraform is and how to install terraform with multiple Linux distributions HashiCorp archives.
What is Terraform?
Terraform is a popular automation cloud management tool used to deploy your infrastructure IAC (As an infrastructure code) approach. Terraform has built Hashicorp and released below Mozilla Public License. It supports both public, private and hybrid clouds, and now Terraform supports 145 service providers, including popular service providers such as AWS, Azure cloud, GCP, Oracle cloud and many more.
Terraform the architecture is very simple. All you need is to load the terraform binary to your local / server machine, which acts as the base machine. We need to mention the service provider to work in our syntax file. Terraform automatically downloads the provider’s plug-in and verifies the provider’s API to implement the plan.
What is infrastructure in code?
The process of managing and managing resources such as a virtual machine, storage space, network, database, etc. through machine-readable configuration files instead of interactive tools or hardware configurations.
- Open source.
- Declarative syntax.
- Modules to be connected.
- Unchanged infrastructure.
- Simple, customer-only architecture.
Installing Terraform on Linux distributions
Terraform primary distribution packages come in
.zip in a format that contains individual executable files that allow you to extract any location on your Linux system.
However, for simpler integration with configuration management tools, terraform also offers package repositories Debian-based and RHEL-based systems that allow you to install Terraform using your default package management tools called APT and Yum.
Install Terraform on Debian, Ubuntu and Mint
$ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - $ sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main" $ sudo apt install terraform
Install Terraform RHEL, CentOS and Fedora
$ sudo yum install -y yum-utils $ sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo $ sudo yum install terraform
Now the installation can be checked by running a simple terraform version command.
$ terraform version
It is in this article. Installation is very simple, easy to install and some text editors like Atom and VSCode also have language support for terraform.