AInfraMinds

πŸ› οΈ How to Install Terragrunt

Terragrunt is a thin wrapper around Terraform that provides extra tools for managing configurations, remote backends, dependencies, and DRY (Don’t Repeat Yourself) practices.

Let’s walk through the steps to install it.


πŸ§‘β€πŸ’» Step-by-Step: Installing Terragrunt

βœ… Prerequisites

Make sure Terraform is already installed on your system.
If not, check out: 🧱 Install Terraform & Azure CLI


πŸͺŸ For Windows

  1. Download the latest Terragrunt .exe:
    Visit the Terragrunt releases page.

  2. Find the latest version and download terragrunt_windows_amd64.exe.

  3. Rename and move it to a directory in your PATH:

    Rename-Item .\terragrunt_windows_amd64.exe terragrunt.exe
    Move-Item .\terragrunt.exe "C:\Program Files\Terragrunt\terragrunt.exe"
    
  4. Add the folder (e.g., C:\Program Files\Terragrunt) to your Environment Variables β†’ Path.

  5. Restart your terminal and test:

     terragrunt --version
    

🍎 For macOS

  1. Using Homebrew:
    brew install terragrunt
    
  2. Verify the installation:
    terragrunt --version
    

🐧 For Linux

  1. Download the latest binary:
    curl -L -o terragrunt https://github.com/gruntwork-io/terragrunt/releases/latest/download/terragrunt_linux_amd64
    
  2. Move it to your bin folder and make it executable:
    chmod +x terragrunt
    sudo mv terragrunt /usr/local/bin/
    
  3. Verify:
    terragrunt --version
    

πŸ“ Directory Structure (Optional Best Practice)

Once installed, you can start structuring your project like this:

project-root/
  └── terragrunt.hcl
  └── env/
      └── dev/
          └── terragrunt.hcl
      └── prod/
          └── terragrunt.hcl

🎯 Final Notes

πŸ‘‰ Return to Infra Concepts & Insights πŸ“¦ Return to Infra World 🏠 Take Me Home

Copyright 2026. All rights reserved.