Skip to content

Add change counters #85

@AnatoliKlamerGP

Description

@AnatoliKlamerGP

When running terraform plan, the output includes a summary of resource changes (e.g., how many resources will be created, updated, or destroyed). However, it can be tedious to quickly identify the total number of destroyed resources, which is often the most critical information to check.

Adding a similar high-level summary to tf-summarise would make it more user-friendly and align with common usage patterns.

Proposed Solution
Include a summary of changes in the output, formatted like:

|---module (+10, ~3, -2 in red)
|	|---my_module
|	|	|---module
|	|	|	|---ecs_alb
|	|	|	|	|---aws_lb (+1)
|	|	|	|	|	|---this[0](+)
|	|	|	|	|---aws_lb_listener (-2)

Table:

....
Saved the plan to: tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "tfplan"
+--------+-------------------------------------------------------------------------------------------+
| CHANGE |                                         RESOURCE                                          |
+--------+-------------------------------------------------------------------------------------------+
| add (2 in green)    | module.my_modules.aws_appautoscaling_policy.this["cpu"]    |
+                              +-------------------------------------------------------------------------------------------+
|                                | module.my_modules.aws_appautoscaling_policy.this["memory"]    |
+                              +-------------------------------------------------------------------------------------------+
+--------+-------------------------------------------------------------------------------------------+

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions