Install Terraform on Windows 10 Using Chocolatey

This blog post will show you how to install Terraform on a Windows Server or Windows 10 machine with Chocolatey package manager.

Install

Installing Terraform on a Windows machine without Chocolatey can be a bit of a pain since there are a few moving parts to go through.

Chocolatey takes away the pain does all the configuration in a few minutes.

Install Chocolatey

The first step in the process is to open PowerShell as Administrator and install Chocolatey using the following command:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Install Terraform

The easy part is installing packages, and in the following command, I’m installing Terraform (the -y switch will not ask for permissions to install Terraform).

choco install -y  terraform

Upgrade

To upgrade Terraform to the latest version you will need to run the following command.

choco upgrade -y terraform


Posted

in

by