mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-04-09 18:01:49 -04:00
81 lines
3.4 KiB
Plaintext
81 lines
3.4 KiB
Plaintext
---
|
|
page_title: APT Packages for Debian and Ubuntu
|
|
description: >-
|
|
The HashiCorp APT repositories contain distribution-specific Terraform
|
|
packages for both Debian and Ubuntu systems.
|
|
---
|
|
|
|
# APT Packages for Debian and Ubuntu
|
|
|
|
The primary distribution packages for Terraform are `.zip` archives containing
|
|
single executable files that you can extract anywhere on your system. However,
|
|
for easier integration with configuration management tools and other systematic
|
|
system configuration strategies, we also offer package repositories for
|
|
Debian and Ubuntu systems, which allow you to install Terraform using the
|
|
`apt install` command or any other APT frontend.
|
|
|
|
If you are instead using Red Hat Enterprise Linux, CentOS, or Fedora, you
|
|
might prefer to [install Terraform from our Yum repositories](/terraform/cli/install/yum).
|
|
|
|
-> **Note:** The APT repositories discussed on this page are generic HashiCorp
|
|
repositories that contain packages for a variety of different HashiCorp
|
|
products, rather than just Terraform. Adding these repositories to your
|
|
system will, by default, therefore make several other non-Terraform
|
|
packages available for installation. That might then mask some packages that
|
|
are available for some HashiCorp products in the main Debian and Ubuntu
|
|
package repositories.
|
|
|
|
## Repository Configuration
|
|
|
|
Please follow the instructions in the [Official Packaging Guide](https://www.hashicorp.com/official-packaging-guide).
|
|
|
|
## Supported Architectures
|
|
|
|
The HashiCorp APT server has packages only for the `amd64`
|
|
architecture, which is also sometimes known as `x86_64`.
|
|
|
|
There are no official packages available for other architectures, such as
|
|
`arm64`. If you wish to use Terraform on a non-`amd64` system,
|
|
[download a normal release `.zip` file](/terraform/downloads) instead.
|
|
|
|
## Supported Debian and Ubuntu Releases
|
|
|
|
The HashiCorp APT server contains release repositories for a variety of
|
|
supported distributions, which are outlined in the [Official Packaging Guide](https://www.hashicorp.com/official-packaging-guide).
|
|
|
|
|
|
## Choosing Terraform Versions
|
|
|
|
The HashiCorp APT repositories contain multiple versions of Terraform, but
|
|
because the packages are all named `terraform` it is impossible to install
|
|
more than one version at a time, and `apt install` will default to selecting
|
|
the latest version.
|
|
|
|
It's often necessary to match your Terraform version with what a particular
|
|
configuration is currently expecting. You can use the following command to
|
|
see which versions are currently available in the repository index:
|
|
|
|
```bash
|
|
apt policy terraform
|
|
```
|
|
|
|
There may be multiple package releases for a particular Terraform version if
|
|
we need to publish an updated package for any reason. In that case, the
|
|
subsequent releases will have an additional suffix, like `0.13.4-2`. In these
|
|
cases, the Terraform executable inside the package should be unchanged, but its
|
|
metadata and other contents may be different.
|
|
|
|
You can select a specific version to install by including it in the
|
|
`apt install` command line, as follows:
|
|
|
|
```bash
|
|
sudo apt install terraform=0.14.0
|
|
```
|
|
|
|
If your workflow requires using multiple versions of Terraform at the same
|
|
time, for example when working through a gradual upgrade where not all
|
|
of your configurations are upgraded yet, we recommend that you use the
|
|
official release `.zip` files instead of the APT packages, so you can install
|
|
multiple versions at once and then select which to use for each command you
|
|
run.
|