Terraform installation

From wikieduonline
Jump to navigation Jump to search
  • Linux:
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get -qq update && sudo apt-get install terraform && terraform -v

Ref: https://learn.hashicorp.com/tutorials/terraform/install-cli

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

Or copy binary using wget/curl

Errors[edit]

Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-mantic.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-mantic.list
Hit:1 http://archive.ubuntu.com/ubuntu mantic InRelease
Hit:2 http://security.ubuntu.com/ubuntu mantic-security InRelease                         
Hit:3 https://baltocdn.com/helm/stable/debian all InRelease                               
Hit:4 http://archive.ubuntu.com/ubuntu mantic-updates InRelease     
Get:5 http://security.ubuntu.com/ubuntu mantic-security/main amd64 DEP-11 Metadata [7954 B]
Hit:6 http://archive.ubuntu.com/ubuntu mantic-backports InRelease                                
Ign:7 https://apt.releases.hashicorp.com mantic InRelease                                        
Get:8 http://security.ubuntu.com/ubuntu mantic-security/universe amd64 DEP-11 Metadata [4195 B]
Err:9 https://apt.releases.hashicorp.com mantic Release                               
  404  Not Found [IP: 18.66.161.31 443]
Get:10 http://archive.ubuntu.com/ubuntu mantic/main amd64 DEP-11 Metadata [665 kB]
Get:11 http://archive.ubuntu.com/ubuntu mantic/universe amd64 DEP-11 Metadata [5809 kB]
Get:12 http://archive.ubuntu.com/ubuntu mantic/multiverse amd64 DEP-11 Metadata [38.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 DEP-11 Metadata [7960 B]                                                                             
Get:14 http://archive.ubuntu.com/ubuntu mantic-updates/universe amd64 DEP-11 Metadata [4197 B]                                                                         
Reading package lists... Done                                                                                                                                          
W: https://baltocdn.com/helm/stable/debian/dists/all/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: The repository 'https://apt.releases.hashicorp.com mantic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


Found existing deb entry in /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-mantic.list
Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-mantic.list
Found existing deb-src entry in /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-mantic.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-mantic.list
Hit:1 http://archive.ubuntu.com/ubuntu mantic InRelease
Hit:2 http://security.ubuntu.com/ubuntu mantic-security InRelease                        
Hit:3 https://baltocdn.com/helm/stable/debian all InRelease                              
Hit:4 http://archive.ubuntu.com/ubuntu mantic-updates InRelease                          
Ign:5 https://apt.releases.hashicorp.com mantic InRelease
Hit:6 http://archive.ubuntu.com/ubuntu mantic-backports InRelease
Err:7 https://apt.releases.hashicorp.com mantic Release
  404  Not Found [IP: 3.160.69.114 443]
Reading package lists... Done
W: https://baltocdn.com/helm/stable/debian/dists/all/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: The repository 'https://apt.releases.hashicorp.com mantic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details. 

Related[edit]

See also[edit]

Advertising: