terragrunt
terragrunt copied to clipboard
Disable color output
is there any way to disable the colored output from the terragrunt binary?
~ $ terragrunt plan --help | grep color
-no-color If specified, output won't contain any color.
~ $ terragrunt apply --help | grep color
-no-color If specified, output won't contain any color.
that removes the color output from the terraform runs, not from the terragrunt runs. the output from the CI pipeline into github has a lot of these strings �[4m{�[0m�[0m i suppose those are color strings/encodings for terminal
What is the terragrunt command that your pipeline is running?
cd <dir>; terragrunt plan -no-color-out=$planfile
Ah, and it's suppressing terraform color but still generating terragrunt output in color?
Correct
hi,
most probably will help setting env variable TF_CLI_ARGS="-no-color"
https://github.com/hashicorp/terraform/issues/23708#issuecomment-571676112
https://github.com/hashicorp/terraform/issues/15264
TF_CLI_ARGS="-no-color"
That does not works, at least for hclfmt
That's is from the logger https://github.com/gruntwork-io/terragrunt/blob/master/util/logger.go
And can be disabled by "set DisableColors
field to true
"
https://github.com/sirupsen/logrus#formatters
At the same time, in CI envs it should works perfectly
Resolved in v0.48.7 release.