terraform/plans/internal/planproto
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
..
doc.go plans/planfile: Reading and writing the new plan format 2018-10-16 18:50:29 -07:00
generate.go plans/planfile: Reading and writing the new plan format 2018-10-16 18:50:29 -07:00
planfile.pb.go core: Handle forced-create_before_destroy during the plan walk 2018-10-16 19:14:11 -07:00
planfile.proto core: Handle forced-create_before_destroy during the plan walk 2018-10-16 19:14:11 -07:00