Skip to content
👷 The Terragrunt website redesign is Work In Progress! 👷
For a list of outstanding TODOs see this.
To give feedback, click here.

Overview

The Terragrunt CLI is designed to make it as easy as possible to manage infrastructure at any scale.

To support that design, there are certain patterns that are used throughout the CLI. This document will help you understand those patterns so you can use the CLI more effectively.

Usage

Most of the time, if you are trying to use Terragrunt to run a command that you would normally run with OpenTofu/Terraform, you can just replace tofu/ terraform with terragrunt.

Terragrunt will pass the command to tofu/ terraform with the same arguments.

Terminal window
terragrunt plan

Terragrunt doesn’t always just pass the command. It frequently does some additional processing to make it easier to manage infrastructure at scale.

For example, in the previous plan command, you wouldn’t have to explicitly run init like you would with tofu/ terraform. Terragrunt takes advantage of a feature called Auto-init to automatically run init when necessary.

Using Terragrunt in this way is taking advantage of the OpenTofu Shortcuts that Terragrunt provides.

Terragrunt also has some other commands that are unique to Terragrunt.

Main Commands

These are the main commands you will use with Terragrunt:

Backend Commands

These are the commands that are used when working with OpenTofu/Terraform state backends:

Stack Commands

These are the commands that are used when working with a terragrunt.stack.hcl file:

Catalog Commands

These are the commands that are used when working with a Terragrunt catalog:

Discovery Commands

These are the commands that are used to discover units in your Terragrunt project:

Configuration Commands

These are the commands that are used to interact directly with Terragrunt configuration:

Global Flags

There are some flags that are available to all Terragrunt commands: