terraform/command/jsonplan
Kristin Laemmert 4b10a6e1bf
command/jsonplan: fix bug with nested modules output (#23092)
`marshalPlannedValues` builds a map of modules to their children in
order to output the resource changes in a tree. The map was built from
the list of resource changes. However if a module had no resources
itself, and only called another module (a very normal case), that module
would not get added to the map causing none of its children to be
output in `planned_values`.

This PR adds a walk up through a given module's ancestors to ensure that
each module, even those without resources, would be added.
2019-10-17 11:33:04 -04:00
..
doc.go json output of terraform plan (#19687) 2018-12-19 11:08:25 -08:00
module.go command/jsonplan: sort resources by address (#20113) 2019-01-25 09:17:40 -08:00
plan.go command/show (json): marshal the state snapshot included with the plan file (#21597) 2019-06-05 07:29:02 -04:00
plan_test.go command/jsonplan: Don't panic with mixtures of known/unknown/empty 2019-05-28 19:33:21 -07:00
resource.go command/show: add provider name to resource changes (#20711) 2019-03-15 13:20:43 -07:00
values.go command/jsonplan: fix bug with nested modules output (#23092) 2019-10-17 11:33:04 -04:00
values_test.go command/show (plan -json): fix panic (#21541) 2019-06-03 07:14:23 -05:00