3  Terraform

Here are the guidelines to install Terraform on Windows, macOS, and Linux.

3.0.1 1. Install Terraform on Windows

3.0.2 2. Install Terraform on macOS

3.0.2.2 Manual Installation (Alternative)

  1. Download Terraform:

  2. Extract and Move Terraform:

    • Extract the .zip file.

    • Move terraform binary to /usr/local/bin:

      sudo mv terraform /usr/local/bin/
  3. Verify Installation:

    terraform -v

3.0.3 3. Install Terraform on Linux

3.0.3.1 Using Package Repositories (Debian/Ubuntu)

  1. Add HashiCorp GPG Key and Repository:

    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"
  2. Install Terraform:

    sudo apt-get update && sudo apt-get install terraform
  3. Verify Installation:

    terraform -v

3.0.3.2 Using Package Repositories (RHEL/CentOS/Fedora)

  1. Add HashiCorp Repository:

    sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
  2. Install Terraform:

    sudo dnf install terraform
  3. Verify Installation:

    terraform -v

3.0.3.3 Manual Installation (For Other Distributions)

  1. Download Terraform:

  2. Extract and Move Terraform:

    unzip terraform_<version>_linux_amd64.zip
    sudo mv terraform /usr/local/bin/
  3. Verify Installation:

    terraform -v

These steps should enable you to install Terraform on Windows, macOS, and Linux systems easily.