a43b7df282
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. |
||
---|---|---|
.. | ||
testdata/test-config | ||
config_snapshot.go | ||
config_snapshot_test.go | ||
doc.go | ||
planfile_test.go | ||
reader.go | ||
tfplan.go | ||
tfplan_test.go | ||
writer.go |