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.tfvarsfile. May also be specified via theTERRAGRUNT_CONFIGenvironment variable. The default path isterraform.tfvarsin 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-allcommands. -
--terragrunt-tfpath: A custom path to the Terraform binary. May also be specified via theTERRAGRUNT_TFPATHenvironment variable. The default isterraformin a directory on your PATH. -
--terragrunt-no-auto-init: Don’t automatically runterraform initwhen other commands are run (e.g.terragrunt apply). Useful if you want to pass custom arguments toterraform initthat are specific to a user or execution environment, and therefore cannot be specified asextra_arguments. For example,-plugin-dir. You must runterragrunt inityourself in this case if needed.terragruntwill fail if it detects thatinitis 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 theterraformcommand. Default is the current working directory. Note that for theapply-all,destroy-all,output-all,validate-all, andplan-allcommands, this parameter has a different meaning: Terragrunt will apply or destroy all the Terraform modules in the subfolders of theterragrunt-working-dir, runningterraformin 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_SOURCEenvironment 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-allcommands, Terragrunt will assume this is the local file path for all of your Terraform modules, and for each module processed by thexxx-allcommand, Terragrunt will automatically append the path ofsourceparameter in each module to the--terragrunt-sourceparameter you passed in. -
--terragrunt-source-update: Delete the contents of the temporary folder before downloading Terraform source code into it. -
--terragrunt-ignore-dependency-errors:*-allcommands 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_ROLEenvironment variable. This is a convenient way to use Terragrunt and Terraform with multiple AWS accounts.