Install Terraform

Install the Terraform CLI with the latest version:

 

Release Information

 

Install Terraform with Specific Version

To install a specific Terraform version we could use tenv, so tenv is a lightweight and versatile Terraform version manager that helps you easily install, switch, and manage multiple Terraform versions on your local machine. With tenv, you can ensure your projects always use the correct Terraform version without manual downloads or complex configurations. It’s especially useful for teams working on multiple infrastructure-as-code projects that require different Terraform versions.

Install the tenv with the latest version

tenv Usage

  tenv <tool> command
tenv <tool> install <version>
  
tool (alias)env varsdescription
tofu (opentofu)TOFUENV_OpenTofu
tf (terraform)TFENV_Terraform
tg (Terragrunt)TG_Terragrunt
at (atmos)ATMOS_Atmos

 

Install Terraform with tenv

Install Terraform with version 1.11.4

  tenv tf install 1.11.4
  

Install Another Version of Terraform with tenv

Install Terraform with version 1.10.5

  tenv tf install 1.10.5
  

 

Manage Multiple Terraform Versions

Now, we have multiple version of Terraform installed in our local (1.11.4 and 1.10.5). To see a list of installed versions:

  $ tenv tf list
  1.10.5 (used 2025-04-15)
* 1.11.4 (used 2025-04-15, set by /Users/ardityo.mulawarman/.tenv/Terraform/version)
  

To use specific version, we could just simply select it:

  $ tenv tf use 1.10.5
Written 1.10.5 in /Users/ardityo.mulawarman/.tenv/Terraform/version
  

Validate Terraform Version

  $ terraform version
Terraform v1.10.5
on darwin_arm64

Your version of Terraform is out of date! The latest version
is 1.11.3. You can update by downloading from https://www.terraform.io/downloads.html