Subcommands33 subcommands
terragrunt init
Prepare your working directory for other commands
terragrunt validate
Check whether the configuration is valid
terragrunt plan
Show changes required by the current configuration
terragrunt apply
Create or update infrastructure
terragrunt destroy
Destroy previously-created infrastructure
terragrunt console
Try Terraform expressions at an interactive command prompt
terragrunt fmt
Reformat your configuration in the standard style
terragrunt force-unlock
Release a stuck lock on the current workspace
terragrunt get
Install or upgrade remote Terraform modules
terragrunt graph
Generate a Graphviz graph of the steps in an operation
terragrunt import
Associate existing infrastructure with a Terraform resource
terragrunt login
Obtain and save credentials for a remote hos
terragrunt logout
Remove locally-stored credentials for a remote host
terragrunt output
Show output values from your root module
terragrunt providers
Show the providers required for this configuration
terragrunt refresh
Update the state to match remote systems
terragrunt show
Show the current state or a saved plan
terragrunt state
Advanced state management
terragrunt taint
Mark a resource instance as not fully functional
terragrunt untaint
Remove the 'tainted' state from a resource instance
terragrunt workspace
Workspace management
terragrunt workspace new
Create a new workspace
terragrunt workspace show
Display the current workspace
terragrunt workspace list
List the workspace
terragrunt workspace delete
Delete the specified workspace
terragrunt workspace select
Change the current working workspace
terragrunt run-all
Run a terraform command against a 'stack' by running the specified command in each subfolder. E.g., to run 'terragrunt apply' in each subfolder, use 'terragrunt run-all apply'
terragrunt terragrunt-info
Emits limited terragrunt state on stdout and exits
terragrunt validate-inputs
Checks if the terragrunt configured inputs align with the terraform defined variables
terragrunt graph-dependencies
Prints the terragrunt dependency graph to stdout
terragrunt hclfmt
Recursively find hcl files and rewrite them into a canonical format
terragrunt aws-provider-patch
Overwrite settings on nested AWS providers to work around a Terraform bug (issue #13018)
terragrunt render-json
Render the final terragrunt config, with all variables, includes, and functions resolved, as json. This is useful for enforcing policies using static analysis tools like Open Policy Agent, or for debugging your terragrunt config
OptionsOn terragrunt itself
-h--help
Show this help output, or the help for a specified subcommand
-v--version
Show the current Terragrunt version
--terragrunt-config
Path to the Terragrunt config file. Default is terragrunt.hcl <value>
--terragrunt-tfpath
Path to the Terraform binary. Default is terraform (on PATH) <value>
--terragrunt-no-auto-init
Don't automatically run 'terraform init' during other terragrunt commands. You must run 'terragrunt init' manually
--terragrunt-no-auto-retry
Don't automatically re-run command in case of transient errors
--terragrunt-non-interactive
Assume 'yes' for all prompts
--terragrunt-working-dir
The path to the Terraform templates. Default is current directory <value>
--terragrunt-download-dir
The path where to download Terraform code. Default is .terragrunt-cache in the working directory <value>
--terragrunt-source
Download Terraform configurations from the specified source into a temporary folder, and run Terraform in that temporary folder <value>
--terragrunt-source-map
Replaces any source URL (including the source URL of a config pulled in with dependency blocks) that has root source with dest
--terragrunt-source-update
Delete the contents of the temporary folder to clear out any old, cached source code before downloading new source code into it
--terragrunt-ignore-dependency-errors
*-all commands continue processing components even if a dependency fails
--terragrunt-iam-role
Assume the specified IAM role before executing Terraform. Can also be set via the TERRAGRUNT_IAM_ROLE environment variable <IAM role ARN>
--terragrunt-iam-assume-role-duration
Session duration for IAM Assume Role session. Can also be set via the TERRAGRUNT_IAM_ASSUME_ROLE_DURATION environment variable <Duration>
--terragrunt-iam-assume-role-session-name
Name for the IAM Assummed Role session. Can also be set via TERRAGRUNT_IAM_ASSUME_ROLE_SESSION_NAME environment variable <Session name>
--terragrunt-exclude-dir
Unix-style glob of directories to exclude when running *-all commands <value>
--terragrunt-include-dir
Unix-style glob of directories to include when running *-all commands <value>
--terragrunt-strict-include
Only modules under the directories passed in with –terragrunt-include-dir will be included. All dependencies of the included directories will be excluded if they are not in the included directories. If no –terragrunt-include-dir flags are included, terragrunt will not include any modules during the execution of the commands
--terragrunt-strict-validate
Sets strict mode for the validate-inputs command. By default, strict mode is off. When this flag is passed, strict mode is turned on. When strict mode is turned off, the validate-inputs command will only return an error if required inputs are missing from all input sources (env vars, var files, etc). When strict mode is turned on, an error will be returned if required inputs are missing OR if unused variables are passed to Terragrunt
--terragrunt-ignore-dependency-order
*-all commands will be run disregarding the dependencies
--terragrunt-ignore-external-dependencies
*-all commands will not attempt to include external dependencies
--terragrunt-include-external-dependencies
*-all commands will include external dependencies
--terragrunt-parallelism
*-all commands parallelism set to at most N modules <N>
--terragrunt-debug
Write terragrunt-debug.tfvars to working folder to help root-cause issues
--terragrunt-log-level
Sets the logging level for Terragrunt. Supported levels: panic, fatal, error, warn (default), info, debug, trace
--terragrunt-check
Enable check mode in the hclfmt command
--terragrunt-hclfmt-file
The path to a single hcl file that the hclfmt command should run on <hcl file>
--terragrunt-override-attr
A key=value attribute to override in a provider block as part of the aws-provider-patch command. May be specified multiple times <value>
--terragrunt-json-out
The file path that terragrunt should use when rendering the terragrunt.hcl config as json. Only used in the render-json command. Defaults to terragrunt_rendered.json <value>
--terragrunt-modules-that-include
When passed in, run-all will only run the command against Terragrunt modules that include the specified file <value>