🎓 A1Learner
🔍
0 of 50 lessons completed

Install Terraform

Installing Terraform means placing the Terraform program on your computer and checking it runs. One command confirms the install.

Install on macOS

Homebrew downloads Terraform and places it on the path. The path is where the terminal looks for programs.

# macOS with Homebrew
brew install terraform

Install on Linux

The downloaded file is a zip archive. Unzip it and move the program into a folder on the path.

# Linux: download, unzip, and move the binary
unzip terraform_1.17.1_linux_amd64.zip
sudo mv terraform /usr/local/bin/

Verify the install

The version command is the check. This course uses the verified version 1.17.1.

terraform version

Example

terraform version

Key points

  • Terraform is one program, downloaded as a single file called a binary.
  • On Windows, download it from the official site or use a package manager.
  • On macOS, download it or use Homebrew.
  • On Linux, download it or use your system package manager.
  • After install, close and reopen the terminal before running a command.
  • Pin the version to 1.17.x, so every learner in this course uses the same behaviour.

The command prints the Terraform version and the platform it runs on. The version line confirms the install worked and the pinned version is present.

Try it Yourself

Edit the code, then press Run.

Running is simulated · Rust Playground

Exercise

Which command confirms Terraform is installed correctly?