terraform/internal/command/jsonplan
Alisdair McDiarmid 3e4d6b252f jsonplan: Improve performance for deep objects
When calculating the unknown values for JSON plan output, we would
previously recursively call the `unknownAsBool` function on the current
sub-tree twice, if any values were unknown. This was wasteful, but not
noticeable for normal Terraform resource shapes.

However for deeper nested object values, such as Kubernetes manifests,
this was a severe performance problem, causing `terraform show -json` to
take several hours to render a plan.

This commit reuses the already calculated unknown value for the subtree,
and adds benchmark coverage to demonstrate the improvement.
2022-02-18 17:00:18 -05:00
..
doc.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
module.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
plan.go jsonplan: Improve performance for deep objects 2022-02-18 17:00:18 -05:00
plan_test.go jsonplan: Improve performance for deep objects 2022-02-18 17:00:18 -05:00
resource.go json-output: Previous address for resource changes 2021-09-20 15:25:23 -04:00
values.go de-linting 2021-09-01 11:36:21 -04:00
values_test.go jsonplan and jsonstate: include sensitive_values in state representations (#28889) 2021-06-14 09:19:13 -04:00