User Tools

Site Tools


automation:terraform:tf-install-debian

Install Terraform on Debian

https://cloudinfrastructureservices.co.uk/how-to-install-terraform-on-debian-11-server-tutorial-step-by-step/

Update the system first:

apt update -y && apt upgrade -y''\\

First, install the required dependencies using the following command:
apt-get install wget curl unzip software-properties-common gnupg2 -y

Second, download and add the HashiCorp signed gpg keys to your system:
# OLD, do not use: curl -fsSL https://apt.releases.hashicorp.com/gpg > /etc/apt/trusted.gpg.d/hashicorp.gpg
curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/hashicorp.gpg

Next, add the HashiCorp repository to the APT using the following command:
apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Next, update the repository using the command given below:
apt update -y

Finally, install the Terraform by running the following command:
apt-get install terraform -y

Once Terraform has been installed, verify it using the following command:
terraform -v

You will get the Terraform version in the following output:
Terraform v1.1.7
on linux_amd64

automation/terraform/tf-install-debian.txt · Last modified: 2023/12/05 14:08 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki