install terraform

warningwarning

hashcorp enabled access restrictions depending on your location – eventually workaround sanctions with:

  1. curl --socks5
  2. apt-cacher-ng

let’s proceed with both at once

as user

ssh some-server-in-the-west -L 3142:localhost:3142 -D 1080

point to the proxied repository

as root

cd /etc/apt/apt.conf.d/
vi 01proxy

Acquire::http::Proxy::apt.releases.hashicorp.com "http://localhost:3142";

installinstall

as root

terraform

prepare the signing pubkey

apt install gnupg1 lsb-release

# no exist
ls -lF /usr/share/keyring/hashicorp*
ls -lF /etc/apt/sources.list.d/hashicorp*

curl --socks5 localhost:1080 https://apt.releases.hashicorp.com/gpg \
-o /usr/share/keyrings/hashicorp.asc
gpg1 --dearmor < /usr/share/keyrings/hashicorp.asc > /usr/share/keyrings/hashicorp.gpg

now setup the repo – questing goes plucky as for jan 2026

cat > /etc/apt/sources.list.d/hashicorp.list <<EOF
deb [signed-by=/usr/share/keyrings/hashicorp.gpg] https://apt.releases.hashicorp.com `lsb_release -cs` main
EOF
apt update
apt install terraform

terragrunt

grab latest release from https://github.com/gruntwork-io/terragrunt/releases

# avoid outdated terragrunt that looks for tfvars file
#snap install terragrunt
ver=v0.97.2
wget https://github.com/gruntwork-io/terragrunt/releases/download/$ver/terragrunt_linux_amd64.tar.gz
tar xzf terragrunt_linux_amd64.tar.gz
mv -i terragrunt_linux_amd64 /usr/local/bin/terragrunt
chmod +x /usr/local/bin/terragrunt
rm -f terragrunt_linux_amd64.tar.gz

as user

terraform version
terraform -install-autocomplete
terragrunt --version

yandex provideryandex provider

make sure you’ve installed yandex cli

be able to reach your provider

vi ~/.terraformrc
provider_installation {
  network_mirror {
    url = "https://terraform-mirror.yandexcloud.net/"
    include = ["registry.terraform.io/*/*"]
  }
  direct {
    exclude = ["registry.terraform.io/*/*"]
  }
}

clean-upclean-up

as root

mv -i /etc/apt/sources.list.d/hashicorp.list /etc/apt/sources.list.d/hashicorp.list.disabled

vi /etc/apt/apt.conf.d/01proxy

#Acquire::...

resourcesresources

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

http://terragrunt.gruntwork.io/docs/getting-started/install/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Licensed under MIT