Install Terraform
In this exercise, we will install Terraform on our Ubuntu host.
- Download the public signing key for the package repositories. To get started, execute the following commands:
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o
/usr/share/keyrings/hashicorp-archive-keyring.gpg
- Add the appropriate apt repository:
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
- Update the apt package index and install Terraform:
sudo apt update && sudo apt install terraform
- Verify the Terraform installation.
terraform --version
Terraform v1.7.4
on linux_amd64