dineshba/tf-summarize

Terragrunt support

Opened this issue ยท 3 comments

Hi! You have an interesting util, but suddenly it does not work with Terragrunt.

I tried, but I got the following error:

terragrunt run-all plan --terragrunt-non-interactive --terragrunt-working-dir ./vpc | tf-summarize
INFO[0000] The stack at ./vpc will be processed in the following order for command plan:
Group 1
- Module .../vpc

error when parsing input: invalid character '\x1b' looking for beginning of value

The following approach can be used

  1. Update global terragrunt.hcl with the following:
terraform {
  extra_arguments "auto_plan_file" {
    commands = [
      "plan",
    ]

    arguments = ["-out=tfplan.output"]
  }
}

Next run the following:

find . -name tfplan.output -exec tf-summarize {} \;

But I don't really like the output. I think there is a need to add some filtering for resources that are not being updated:

+--------+----------+
| CHANGE | RESOURCE |
+--------+----------+
+--------+----------+
+--------+----------+
| CHANGE | RESOURCE |
+--------+----------+
+--------+----------+
+--------+----------+
| CHANGE | RESOURCE |
+--------+----------+
+--------+----------+
+--------+----------+
| CHANGE | RESOURCE |
+--------+----------+
+--------+----------+

+1 to terragrunt support. This would be a huge DX and quality-of-life improvement. I'd donate money to see that developed.

It would be great to have terragrunt support, the logs there are far from the ideal size.