terraform/terraform
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
..
test-fixtures terraform: run prune destroy on validate 2015-05-05 12:11:49 -07:00
context.go core: validate graph w/ diff during plan phase 2015-05-05 17:24:44 -05:00
context_test.go terraform: run prune destroy on validate 2015-05-05 12:11:49 -07:00
diff.go core: avoid diff mismatch on NewRemoved fields during -/+ 2015-04-14 17:23:30 -05:00
diff_test.go core: avoid diff mismatch on NewRemoved fields during -/+ 2015-04-14 17:23:30 -05:00
eval.go
eval_apply.go
eval_check_prevent_destroy.go core: add prevent_destroy lifecycle flag 2015-04-17 10:40:04 -05:00
eval_context.go terraform: set variables in the proper location 2015-05-01 16:29:19 -07:00
eval_context_builtin.go terraform: update comment on interpolater stuff 2015-05-04 10:51:34 -07:00
eval_context_mock.go terraform: set variables in the proper location 2015-05-01 16:29:19 -07:00
eval_count.go terraform: catch scenario where both "foo" and "foo.0" are in state 2015-03-01 21:28:41 -08:00
eval_diff.go terraform: add reason to diff mismatch error 2015-04-13 09:31:09 -05:00
eval_diff_test.go
eval_error.go core: [refactor] store Deposed resource instances as a list 2015-03-04 12:25:59 -06:00
eval_filter.go
eval_filter_operation.go
eval_if.go core: [refactor] pull Deposed out of Tainted list 2015-03-04 12:25:47 -06:00
eval_interpolate.go
eval_interpolate_test.go
eval_noop.go
eval_output.go terraform: EvalDeleteOutput and context test 2015-04-29 11:27:12 -07:00
eval_provider.go terraform: fix provider config inheritance during input 2015-04-10 16:28:47 -05:00
eval_provider_test.go terraform: merge provider configs before validate [GH-1282] 2015-03-25 16:28:52 -07:00
eval_provisioner.go
eval_provisioner_test.go
eval_refresh.go
eval_resource.go
eval_sequence.go
eval_sequence_test.go
eval_state.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
eval_state_test.go core: tweaks from code review 2015-03-05 10:11:14 -06:00
eval_test.go
eval_validate.go terraform: merge provider configs before validate [GH-1282] 2015-03-25 16:28:52 -07:00
eval_variable.go terraform: set variables in the proper location 2015-05-01 16:29:19 -07:00
evaltree_provider.go terraform: fix provider config inheritance during input 2015-04-10 16:28:47 -05:00
graph.go terraform: missing providers need to do dependencies 2015-05-01 18:08:06 -07:00
graph_builder.go terraform: destroy transform must happen globally 2015-05-02 18:21:00 -07:00
graph_builder_test.go terraform: remove test 2015-05-01 18:17:49 -07:00
graph_config_node.go terraform: fill in more flat interfaces 2015-05-01 15:28:41 -07:00
graph_config_node_module.go terraform: update comment 2015-05-04 10:49:34 -07:00
graph_config_node_module_test.go terraform: add module destroy node to graph 2015-05-01 18:26:35 -07:00
graph_config_node_output.go terraform: skip outputs for destroy graphs 2015-05-02 18:28:26 -07:00
graph_config_node_provider.go terraform: providers in flattened graphs should depend on the parent 2015-05-01 16:41:49 -07:00
graph_config_node_resource.go core: validate graph w/ diff during plan phase 2015-05-05 17:24:44 -05:00
graph_config_node_test.go terraform: redo how flattening works 2015-05-01 15:18:40 -07:00
graph_config_node_type.go terraform: add variables as graph nodes (no eval yet) 2015-04-30 16:27:20 -07:00
graph_config_node_variable.go terraform: set variables in the proper location 2015-05-01 16:29:19 -07:00
graph_config_node_variable_test.go terraform: set variables in the proper location 2015-05-01 16:29:19 -07:00
graph_dot.go core: graph command gets -verbose and -draw-cycles 2015-04-27 09:23:47 -05:00
graph_dot_test.go core: graph command gets -verbose and -draw-cycles 2015-04-27 09:23:47 -05:00
graph_interface_subgraph.go terraform: subpath context setting 2015-05-01 14:19:32 -07:00
graph_test.go
graph_walk.go terraform: subpath context setting 2015-05-01 14:19:32 -07:00
graph_walk_context.go terraform: set variables in the proper location 2015-05-01 16:29:19 -07:00
graph_walk_operation.go
graph_walk_test.go
graphnodeconfigtype_string.go terraform: add variables as graph nodes (no eval yet) 2015-04-30 16:27:20 -07:00
hook.go
hook_mock.go
hook_stop.go
hook_stop_test.go
hook_test.go
instancetype.go core: formalize resource addressing 2015-03-31 15:04:10 -05:00
instancetype_string.go core: formalize resource addressing 2015-03-31 15:04:10 -05:00
interpolate.go terraform: allow TF_VAR_name to be set to set variables 2015-04-22 06:31:53 +02:00
interpolate_test.go core: don't crash when count.index is used in the wrong context 2015-04-15 10:23:53 -05:00
path.go
plan.go core: targeted operations 2015-03-31 14:49:38 -05:00
plan_test.go
resource.go helper/schema: FieldReaderConfig detects computed maps 2015-04-21 22:07:52 +02:00
resource_address.go core: fix targeting with non-word chars 2015-04-30 15:49:37 -05:00
resource_address_test.go core: fix targeting with non-word chars 2015-04-30 15:49:37 -05:00
resource_provider.go
resource_provider_mock.go
resource_provider_mock_test.go
resource_provider_test.go
resource_provisioner.go
resource_provisioner_mock.go
resource_provisioner_mock_test.go
resource_test.go
semantics.go
semantics_test.go
state.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
state_test.go providers/aws: handle empty instancestate in state migration 2015-03-26 13:07:04 -05:00
state_v1.go
state_v1_test.go
terraform_test.go terraform: destroy transform must happen globally 2015-05-02 18:21:00 -07:00
transform.go
transform_config.go terraform: outputs connect properly 2015-05-01 11:26:58 -07:00
transform_config_test.go terraform: add variables as graph nodes (no eval yet) 2015-04-30 16:27:20 -07:00
transform_deposed.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
transform_destroy.go terraform: skip outputs for destroy graphs 2015-05-02 18:28:26 -07:00
transform_destroy_test.go core: validate graph w/ diff during plan phase 2015-05-05 17:24:44 -05:00
transform_expand.go
transform_expand_test.go
transform_flatten.go terraform: redo how flattening works 2015-05-01 15:18:40 -07:00
transform_flatten_test.go terraform: add module destroy node to graph 2015-05-01 18:26:35 -07:00
transform_module.go terraform: add module destroy node to graph 2015-05-01 18:26:35 -07:00
transform_module_test.go
transform_orphan.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
transform_orphan_test.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
transform_output.go terraform: EvalDeleteOutput and context test 2015-04-29 11:27:12 -07:00
transform_output_test.go terraform: add output orphan transformer 2015-04-29 11:18:58 -07:00
transform_provider.go terraform: add edge for missing providers 2015-05-01 18:39:24 -07:00
transform_provider_test.go terraform: add variables as graph nodes (no eval yet) 2015-04-30 16:27:20 -07:00
transform_provisioner.go terraform: flattenable graphNodeMissingProvisioner 2015-05-05 12:45:28 -07:00
transform_provisioner_test.go
transform_proxy.go terraform: proxy uses custom edge 2015-05-01 11:41:01 -07:00
transform_proxy_test.go terraform: GraphNodeProxy 2015-05-01 11:38:36 -07:00
transform_resource.go terraform: module dependencies in graph use full name (FOR THE FUTURE) 2015-04-30 17:19:01 -07:00
transform_resource_test.go terraform: inner-count dependencies work [GH-1540] 2015-04-18 15:56:43 -07:00
transform_root.go terraform: fill in more flat interfaces 2015-05-01 15:28:41 -07:00
transform_root_test.go
transform_tainted.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
transform_tainted_test.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
transform_targets.go core: fix targeting in destroy w/ provisioners 2015-04-27 08:36:54 -05:00
transform_targets_test.go core: targeted operations 2015-03-31 14:49:38 -05:00
transform_transitive_reduction.go terraform: add TransitiveReductionTransformer 2015-02-27 19:18:04 -08:00
transform_transitive_reduction_test.go terraform: add TransitiveReductionTransformer 2015-02-27 19:18:04 -08:00
transform_vertex.go
transform_vertex_test.go
ui_input.go
ui_input_mock.go
ui_input_prefix.go
ui_input_prefix_test.go
ui_output.go
ui_output_callback.go
ui_output_callback_test.go
ui_output_mock.go
ui_output_mock_test.go
ui_output_provisioner.go
ui_output_provisioner_test.go
util.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
util_test.go
walkoperation_string.go