Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install Terraform in Linux Distributions - DesignLinux

Mar 03 2021
designlinux 0 Comments

In this article, we will discuss what Terraform is and how to install terraform on various Linux distributions using HashiCorp repositories.

What is Terraform?

Terraform is a popular cloud orchestration tool in the world of automation, which is used to deploy your infrastructure through the IAC (Infrastructure as code) approach. Terraform is built by Hashicorp and released under Mozilla Public License. It supports public, private as well as hybrid cloud, as of now Terraform supports 145 providers, which includes popular providers like AWS, Azure cloud, GCP, Oracle cloud, and many others.

Terraform architecture is very simple. All you need is to download the terraform binary to your local/server machine which is going to act as your base machine. We have to mention the provider to work within our syntax file. Terraform will download the plugin for that particular provider automatically and will authenticate with provider API to execute the plan.

What is Infrastructure as Code?

The process of provisioning and managing resources like Virtual Machine, Storage, Network, Database, etc.. through machine-readable definition files, rather than interactive tools or hardware configurations.

Features
  • Open-source.
  • Declarative syntax.
  • Pluggable Modules.
  • Immutable infrastructure.
  • Simple client-only architecture.

Let’s get started…

Installing Terraform in Linux Distributions

The Terraform primary distribution packages come in .zip format, which includes single executable files that you can uncompress any location on your Linux system.

However, for simpler integration with configuration management tools, terraform also offers package repositories for Debian-based and RHEL-based systems, which enables you to install Terraform using your default package management tools called APT and Yum.

Install Terraform in Debian, Ubuntu & 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 in RHEL, CentOS & 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 verified by running a simple terraform version command.

$ terraform version
Check Terraform Version
Check Terraform Version

That’s it for this article. The installation is very simple, easy to set up and some text editors like Atom and VSCode come with language support for terraform too.

Related

Tags: CentOS Tips, Debian Tips, Terraform, Ubuntu Tips

How to Setup FTP Server with VSFTPD on Ubuntu 20.04

Prev Post

Setup Remote Development in VSCode via Remote-SSH Plugin

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 2
  • 831
  • 615,203

DesignLinux.com © All rights reserved

Go to mobile version