terraform/command/format
Martin Atkins a43b7df282 core: Handle forced-create_before_destroy during the plan walk
Previously we used a single plan action "Replace" to represent both the
destroy-before-create and the create-before-destroy variants of replacing.
However, this forces the apply graph builder to jump through a lot of
hoops to figure out which nodes need it forced on and rebuild parts of
the graph to represent that.

If we instead decide between these two cases at plan time, the actual
determination of it is more straightforward because each resource is
represented by only one node in the plan graph, and then we can ensure
we put the right nodes in the graph during DiffTransformer and thus avoid
the logic for dealing with deposed instances being spread across various
different transformers and node types.

As a nice side-effect, this also allows us to show the difference between
destroy-then-create and create-then-destroy in the rendered diff in the
CLI, although this change doesn't fully implement that yet.
2018-10-16 19:14:11 -07:00
..
diagnostic.go command/format: include source snippets in diagnostics 2018-10-16 18:20:32 -07:00
diff.go core: Handle forced-create_before_destroy during the plan walk 2018-10-16 19:14:11 -07:00
format.go command/format: a package for formatting plans/state for output 2017-01-26 14:33:49 -08:00
plan.go core: Handle forced-create_before_destroy during the plan walk 2018-10-16 19:14:11 -07:00
plan_test.go Fix up some missed "go fmt" 2018-10-16 18:49:20 -07:00
state.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00