CLI Options
Terragrunt forwards all arguments and options to Terraform. The only exceptions are --version
and arguments that
start with the prefix --terragrunt-
. The currently available options are:
-
--terragrunt-config
: A custom path to theterraform.tfvars
file. May also be specified via theTERRAGRUNT_CONFIG
environment variable. The default path isterraform.tfvars
in the current directory (see Configuration for a slightly more nuanced explanation). This argument is not used with theapply-all
,destroy-all
,output-all
,validate-all
, andplan-all
commands. -
--terragrunt-tfpath
: A custom path to the Terraform binary. May also be specified via theTERRAGRUNT_TFPATH
environment variable. The default isterraform
in a directory on your PATH. -
--terragrunt-no-auto-init
: Don’t automatically runterraform init
when other commands are run (e.g.terragrunt apply
). Useful if you want to pass custom arguments toterraform init
that are specific to a user or execution environment, and therefore cannot be specified asextra_arguments
. For example,-plugin-dir
. You must runterragrunt init
yourself in this case if needed.terragrunt
will fail if it detects thatinit
is needed, but auto init is disabled. See Auto-Init -
--terragrunt-non-interactive
: Don’t show interactive user prompts. This will default the answer for all prompts to ‘yes’. Useful if you need to run Terragrunt in an automated setting (e.g. from a script). -
--terragrunt-working-dir
: Set the directory where Terragrunt should execute theterraform
command. Default is the current working directory. Note that for theapply-all
,destroy-all
,output-all
,validate-all
, andplan-all
commands, this parameter has a different meaning: Terragrunt will apply or destroy all the Terraform modules in the subfolders of theterragrunt-working-dir
, runningterraform
in the root of each module it finds. -
--terragrunt-source
: Download Terraform configurations from the specified source into a temporary folder, and run Terraform in that temporary folder. May also be specified via theTERRAGRUNT_SOURCE
environment variable. The source should use the same syntax as the Terraform module source parameter. If you specify this argument for theapply-all
,destroy-all
,output-all
,validate-all
, orplan-all
commands, Terragrunt will assume this is the local file path for all of your Terraform modules, and for each module processed by thexxx-all
command, Terragrunt will automatically append the path ofsource
parameter in each module to the--terragrunt-source
parameter you passed in. -
--terragrunt-source-update
: Delete the contents of the temporary folder before downloading Terraform 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 ARN before running Terraform or AWS commands. May also be specified via theTERRAGRUNT_IAM_ROLE
environment variable. This is a convenient way to use Terragrunt and Terraform with multiple AWS accounts.