Skip to content

Instantly share code, notes, and snippets.

@nov05
Last active May 14, 2026 20:15
Show Gist options
  • Select an option

  • Save nov05/d80a4b4bb855763cfa2f92c893667d07 to your computer and use it in GitHub Desktop.

Select an option

Save nov05/d80a4b4bb855763cfa2f92c893667d07 to your computer and use it in GitHub Desktop.

Terraform with Windows Powershell

  • Install Terraform
winget install Hashicorp.Terraform
  • Find the executable file.
(base) PS D:\software> where.exe terraform
INFO: Could not find files for the given pattern(s).
(base) PS D:\software> winget list Hashicorp.Terraform
Name                Id                  Version Source
-------------------------------------------------------
HashiCorp Terraform Hashicorp.Terraform 1.15.2  winget
(base) PS D:\software> Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter terraform.exe


    Directory:
    C:\Users\guido\AppData\Local\Microsoft\WinGet\Packages\Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----          5/6/2026  11:08 AM      119564936 terraform.exe


(base) PS D:\software>
  • Move the executable folder to another directory. Add the path to the system veriable "PATH". E.g. D:\software\Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe
(base) PS D:\software> Get-ChildItem "D:\software" -Recurse -Filter terraform.exe


    Directory: D:\software\Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----          5/6/2026  11:08 AM      119564936 terraform.exe
  • Restart PowerShell. Check the version.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

Custom profile loaded.
Loading personal and system profiles took 993ms.
(base) PS C:\WINDOWS\system32> terraform version
Terraform v1.15.2
on windows_amd64

Your version of Terraform is out of date! The latest version
is 1.15.3. You can update by downloading from https://developer.hashicorp.com/terraform/install
(base) PS C:\WINDOWS\system32>
(base) PS C:\WINDOWS\system32> terraform version
Terraform v1.15.3
on windows_386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment