Colour coded terragrunt output

terragrunt

#1

Hi, I am new to Terragrunt, trying to use it in place of Terraform.

However, just having installed it after reading the docs for a while. It doesn’t give me any colour coded output in the linux shell, like Terraform does.

Is this by design? It is very hard to read the terragrunt output as it is. What could be causing the output not to be colour coded?

Thanks


#2

The colors work just fine for me with Terragrunt. What version are you on? What OS? Can you post a screenshot of what you’re seeing?


#3

Hi I’m using v0.17.1 on RHEL 7.5

Here is a screenshot of what I’m seeing.

I installed by copying terragrunt to /bin/ (/bin is in my $PATH variable).


#4

That screenshot is only showing Terragrunt output. There’s no Terraform output there, as, at least from what I can see in the screenshot, it’s hitting an error before running terraform plan. What’s the error? What does it look like if you fix it?


#5

Oh, right sorry I was expecting colour coded output with the Terragrunt output before I even fixed the error with Terraform.

The issue is that I have some modules sitting locally and I can’t seem to get Terragrunt to treat the files as local without trying to copy them to the cache, just as if they were on git.

Is there any way to get Terragrunt to lookup and refer to local modules without copying or specifying the --terragrunt-source option?

eg:
# ------------------------------------------------------------------------------
# TERRAGRUNT CONFIGURATION
# ------------------------------------------------------------------------------

terragrunt = {
  terraform {
source = "./terragrunt-modules//aws/compute/ecs-fargate"
  }

#6

Oh, right sorry I was expecting colour coded output with the Terragrunt output before I even fixed the error with Terraform.

Terragrunt’s logging does not currently use colors. Terraform does and that should work as normal.

The issue is that I have some modules sitting locally and I can’t seem to get Terragrunt to treat the files as local without trying to copy them to the cache, just as if they were on git.

The whole point of using the source param with Terragrunt is to get it to copy your files to its local .terragrunt-cache. If you don’t want that, don’t use source. Just put a terraform.tfvars file (with the terragrunt = { ... } config) in the same folder as your .tf files, and run terragrunt in that same folder.


#7

I’ll take that into account, thanks.