Difference between revisions of "Terraform installation"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
* https://developer.hashicorp.com/terraform/install | * https://developer.hashicorp.com/terraform/install | ||
− | |||
* [[macOS]]: <code>[[brew install terraform]]</code> | * [[macOS]]: <code>[[brew install terraform]]</code> | ||
Line 14: | Line 13: | ||
Ref: https://learn.hashicorp.com/tutorials/terraform/install-cli | 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 <code>[[wget]]/[[curl]]</code> | ||
== Errors == | == Errors == | ||
Line 59: | Line 65: | ||
N: Updating from such a repository can't be done securely, and is therefore disabled by default. | 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. | N: See apt-secure(8) manpage for repository creation and user configuration details. | ||
+ | |||
+ | == Related == | ||
+ | * <code>[[tfswitch]]</code> | ||
== See also == | == See also == |
Latest revision as of 13:14, 21 December 2023
- macOS:
brew install terraform
- Ubuntu:
snap install terraform
orsnap install terraform-snap
- Amazon Linux
sudo yum install -y yum-utils && sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo && sudo yum -y install terraform
- 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]
- Terraform, OpenTofu, Terrakube.org, Installation, Terraform AWS, Terraform GCP, Terraform commands, Terraform Cloud, Terraform Enterprise (TFE), HCL, HIL, meta-arguments, providers, modules, resource, provisioners, data sources, backends: remote backends, examples, configuration files, state files, variables, types, Terraform Registry, conditionals:
depends_on
, functions, Blocks, dynamic blocks, errors, Terragrunt, Terraformer, Terratest, Terraform certifications, Terraform map type, Terraform Associate, Terraform: list type,TF_VAR_, TF_LOG
, Terraform provider versioning, Terraform Style Conventions, Required version, Terraform plugin, Terraform Named Values, tags, Changelog,tfsec, tflint
, Operators, Expressions:for, splat
, Debugging, Namespaces, Terraform Landing Zones, CDKTF, Atmos
Advertising: