Skip to content

Instantly share code, notes, and snippets.

@sofianhamiti
Created February 6, 2024 16:18
Show Gist options
  • Save sofianhamiti/949f37b03e8b25b03631dd6cb7a44d1a to your computer and use it in GitHub Desktop.
Save sofianhamiti/949f37b03e8b25b03631dd6cb7a44d1a to your computer and use it in GitHub Desktop.
cd /home
apt-get update && sudo apt-get install -y gnupg software-properties-common
# Install the HashiCorp GPG key.
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
# Verify the key's fingerprint.
gpg --no-default-keyring \
--keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \
--fingerprint
# Add the official HashiCorp repository to the system.
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
tee /etc/apt/sources.list.d/hashicorp.list
# Download the package information from HashiCorp.
apt update
# Install Terraform from the new repository.
apt-get install -y terraform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment