Terragrunt for Beginners

Terragrunt Basic Concepts

Installing Terragrunt

Learn how to install Terragrunt on Windows, macOS, and Linux to streamline your Terraform workflows. Follow the steps below to get up and running in minutes.

Prerequisites

  • Ensure you have Terraform installed and configured: Terraform Documentation.
  • Verify you have permissions to modify your PATH environment variable.
  • For macOS users, Homebrew must be installed: brew --version.

Installation Summary

Operating SystemMethodQuick Command or Action
WindowsDownload BinaryDownload from GitHub, place terragrunt.exe in a directory under PATH
macOSHomebrewbrew install terragrunt
LinuxDownload BinaryDownload from GitHub, move to /usr/local/bin, then chmod +x

Windows

  1. Download the latest terragrunt.exe from the official GitHub releases page.
  2. Move the executable into a folder included in your PATH (for example, C:\Windows\System32 or a custom tools directory).
  3. Open a new Command Prompt or PowerShell window and verify:
terragrunt --version

You should see output similar to:

terragrunt version v0.x.x

Windows Path Configuration

Be careful when editing system environment variables. Incorrect changes to PATH can prevent other applications from running.


macOS

On macOS, use Homebrew to install Terragrunt:

brew install terragrunt

Once the installation completes, confirm it’s successful:

terragrunt --version

If you see the version printed, Terragrunt is ready to use.


Linux

First, download the appropriate binary for your CPU architecture from the official GitHub releases page.

The image provides instructions for installing Terragrunt, showing a list of downloadable assets for different operating systems, including Windows, macOS, and Linux. It also includes a link to the GitHub releases page for Terragrunt.

Then move the binary into a directory on your PATH (e.g., /usr/local/bin) and make it executable:

sudo mv terragrunt /usr/local/bin/
sudo chmod +x /usr/local/bin/terragrunt

Finally, verify the installation:

terragrunt --version

With Terragrunt installed on your platform of choice, you can now leverage its features—such as DRY configurations, remote state management, and automated locking—to enhance your Terraform projects.

Watch Video

Watch video content

Previous
The DRY Principle