Terraform is a program used to build infrastructure automatically—without having to access a cloud provider's console. Terraform files are an example of infrastructure as code (IaC). They are easily read—and written.

Terraform can automatically build, update, and destroy infrastructure. It can create all kinds of resources: virtual machines, users, network devices, and security components. It enables a person to work with multiple cloud providers (AWS, Azure, Google, etc...) and on-premises systems (VMware, KVM, Proxmox) and much more.

✳️
Personally, I use the program a lot; it makes my workflow more efficient. My toolbox would be somewhat empty without it.

The Terraform program is developed by the company HashiCorp. It is freely downloadable.

Watch the following video to see how to install Terraform on Debian Linux. Read on for more information.

Video


Want to install Terraform yourself? See this link. There you will find source downloads and all of the package manager code snippets you need to install Terraform to Linux, macOS, and Windows.

💡
I highly recommend homebrew for macOS and Chocolatey for Windows. They incorporate most of the great features that Linux package managers use.

The code snippets can change over time, but here is an example for Debian Linux:

wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg \

echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list \

sudo apt update && sudo apt install terraform

The commands above setup the GPG keyring, install the HashiCorp repository, and install Terraform. Subsequent HashiCorp programs can simply be installed with the package manager. For example, if you wanted to install HashiCorp Vault:

sudo apt install vault
💡
You can also install from binary or from source.
Go here for an article/video on installing from binary.
Download the latest source code for Terraform from: https://github.com/hashicorp/terraform

When your installation is finished, check it with this command:

terraform version

That should display results similar to the following:

╰─>$ terraform version
Terraform v1.3.7
on linux_amd64

If you are using a Bash terminal, consider installing Terraform autocomplete:

terraform -install-autocomplete

Then restart your terminal so that subcommands can be completed with the tab key.

To learn more about Terraform, use the terraform -help command or see their documentation, or both!

👀
Check out Terraform. In my opinion, it should be included in the toolbox of every sysadmin and devops engineer.

🌎 Terraform Video Course

It's finally published! The HashiCorp Certified Terraform Associate (003) video course is ready for viewing on InformIT & O'Reilly*. Check it out at the links below.

InformIT

HashiCorp Certified Terraform Associate (003) (Video Course) | InformIT
12+ Hours of Video Instruction Learn how to use Infrastructure as Code Using Terraform. HashiCorp Certified Terraform Associate (003) is your full resource to successfully study for this popular exam. With over 12 hours of training, you get comprehensive coverage of all exam objectives outlined by H…

Enter the DPRO discount code to receive 70% off!

O'Reilly*

HashiCorp Certified Terraform Associate (003)
19+ Hours of Video Instruction Learn how to use Infrastructure as Code Using Terraform. HashiCorp Certified Terraform Associate (003) is your full resource to successfully study for this popular exam. … - Selection from HashiCorp Certified Terraform Associate (003) [Video]

* A subscription to the O'Reilly platform is required.


Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Prowse Tech.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.