Skip to content

Instantly share code, notes, and snippets.

@alexolinux
Last active November 28, 2024 00:57
Show Gist options
  • Select an option

  • Save alexolinux/cf262c0c30603201b21e96ed6d98bf91 to your computer and use it in GitHub Desktop.

Select an option

Save alexolinux/cf262c0c30603201b21e96ed6d98bf91 to your computer and use it in GitHub Desktop.
Install terraform by using repository

Hashicorp Terraform Installation


https://developer.hashicorp.com/terraform/install

Based on RHEL Distros

sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum -y install terraform
touch ~/.zshrc
terraform -install-autocomplete

Based on DEBIAN Distros

wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /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

Specific Flavours

Amazon Linux

sudo yum install -y yum-utils shadow-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
sudo yum -y install terraform

Fedora

sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
sudo dnf -y install terraform
@alexolinux
Copy link
Author

Fedora 41

sudo dnf config-manager addrepo --from-repofile=https://rpm.releases.hashicorp.com/fedora/hashicorp.repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment