Skip to content
đŸ§Ș The terragrunt-v1 docs are open for feedback! đŸ§Ș
This site will eventually replace the terragrunt.io site.
To give feedback on your experience with the new docs, 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.

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.

These are the main commands you will use with Terragrunt:

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

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

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

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

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

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