Terragrunt: Terraform "-no-color" option not passed to terraform init

Created on 6 Dec 2017  路  3Comments  路  Source: gruntwork-io/terragrunt

In a command-line such as terragrunt plan --terragrunt-source-update -no-color
the -no-color argument does not get passed to the terraform init call, only to the terraform plan call.

bug help wanted

Most helpful comment

There is a simple end-user workaround for this, and that is setting the TF_CLI_ARGS env variable to -no-color.
That particular flag _should be_ safe for passing to any terraform subcommand, but I have not tested that extensively yet.

All 3 comments

Ah, interesting point. It's a bug, but a slightly tricky one, as when you run plan or other commands, only some of the arguments should get forwarded to init: e.g., -no-color should, but -out=foo.plan should not. So we'd probably need a whitelist of args that are safe to forward along...

PRs for fixing this are welcome!

There is a simple end-user workaround for this, and that is setting the TF_CLI_ARGS env variable to -no-color.
That particular flag _should be_ safe for passing to any terraform subcommand, but I have not tested that extensively yet.

Get this today as well, not big deal.

Was this page helpful?
0 / 5 - 0 ratings