Commit Graph

11 Commits

Author SHA1 Message Date
Sander van Harmelen
d97b24e3c1
Add tests and fix last issues 2016-05-26 19:56:03 -05:00
Paul Hinze
0fff7d1673 core: validate graph w/ diff during plan phase
This reimplements my prior attempt at nipping issues where a plan did
not yield the same cycle an apply did. My prior attempt was to have
ctx.Validate generate a "Verbose" worst-case graph. It turns out that
skipping PruneDestroyTransformer to generate this graph misses important
heuristics that prevent cycles by dropping destroy nodes that are
determined to be unused.

This resulted in Validate improperly failing in scenarios where these
heuristics would have broken the cycle.

We detected the problem during the work on #1781 and worked around the
issue by reverting to the non-Verbose graph in Validate.

This commit accomplishes the original goal in a better way - by
generating the full graph and checking it once Plan has calculated the
diff. This guarantees that any graph issue that would be caught by Apply
will be caught by Plan.
2015-05-05 17:24:44 -05:00
Mitchell Hashimoto
486cde44ec terraform: when pruning destroy, only match exact nodes, or exact counts 2015-04-14 13:17:08 -07:00
Mitchell Hashimoto
b64fd8401c terraform: prune tainted destroys if no tainted in state [GH-1475] 2015-04-14 10:48:45 -07:00
Mitchell Hashimoto
e68ea0d38f terraform: only keep the destroy if we decreased counts 2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
4789f16796 terraform: tainted destroy nodes 2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
8d2ed22e97 terraform: prune destroy nodes for resources not in diff 2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
8db6f722d2 terraform: CBD edge transpositions must happen atomically 2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
f7f1f17b49 terraform: create before destroy 2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
742b45886a terraform: destroy nodes work properly 2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
d7dc0291f5 terraform: put destroy nodes into the graph 2015-02-19 12:08:03 -08:00