-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
When running tf-summarize on a json TF plan output, the resulting table does not always print in the same order, therefore making it more difficult to compare summaries.
Is there a way to force a consistent order? This makes it difficult to use for automating terraform deployments based on expected summarized changes.
E.g.) Running tf-summarize on the exact same plan json 3x in a row gives 2 different resulting tables (due to ordering)
$ cat terraform-plan-results.json | tf-summarize
+----------+--------------------------------------------------------------------------------------------------------+
| CHANGE | RESOURCE |
+----------+--------------------------------------------------------------------------------------------------------+
| add | module.client_infrastructure.module.ecs_task_definition_beatflower[0].aws_ecs_task_definition.ecs_task |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_service_beatflower[0].aws_ecs_service.ecs_service |
+----------+--------------------------------------------------------------------------------------------------------+
| update | module.client_infrastructure.module.ecs_task_service_web[0].aws_ecs_service.ecs_service |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_service_worker[0].aws_ecs_service.ecs_service |
+----------+--------------------------------------------------------------------------------------------------------+
| recreate | module.client_infrastructure.module.ecs_task_definition_web[0].aws_ecs_task_definition.ecs_task |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_definition_worker[0].aws_ecs_task_definition.ecs_task |
+----------+--------------------------------------------------------------------------------------------------------+
$ cat terraform-plan-results.json | tf-summarize
+----------+--------------------------------------------------------------------------------------------------------+
| CHANGE | RESOURCE |
+----------+--------------------------------------------------------------------------------------------------------+
| update | module.client_infrastructure.module.ecs_task_service_web[0].aws_ecs_service.ecs_service |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_service_worker[0].aws_ecs_service.ecs_service |
+----------+--------------------------------------------------------------------------------------------------------+
| recreate | module.client_infrastructure.module.ecs_task_definition_web[0].aws_ecs_task_definition.ecs_task |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_definition_worker[0].aws_ecs_task_definition.ecs_task |
+----------+--------------------------------------------------------------------------------------------------------+
| add | module.client_infrastructure.module.ecs_task_definition_beatflower[0].aws_ecs_task_definition.ecs_task |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_service_beatflower[0].aws_ecs_service.ecs_service |
+----------+--------------------------------------------------------------------------------------------------------+
$ cat terraform-plan-results.json | tf-summarize
+----------+--------------------------------------------------------------------------------------------------------+
| CHANGE | RESOURCE |
+----------+--------------------------------------------------------------------------------------------------------+
| add | module.client_infrastructure.module.ecs_task_definition_beatflower[0].aws_ecs_task_definition.ecs_task |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_service_beatflower[0].aws_ecs_service.ecs_service |
+----------+--------------------------------------------------------------------------------------------------------+
| update | module.client_infrastructure.module.ecs_task_service_web[0].aws_ecs_service.ecs_service |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_service_worker[0].aws_ecs_service.ecs_service |
+----------+--------------------------------------------------------------------------------------------------------+
| recreate | module.client_infrastructure.module.ecs_task_definition_web[0].aws_ecs_task_definition.ecs_task |
+ +--------------------------------------------------------------------------------------------------------+
| | module.client_infrastructure.module.ecs_task_definition_worker[0].aws_ecs_task_definition.ecs_task |
+----------+--------------------------------------------------------------------------------------------------------+
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed