opentofu/terraform
Mitchell Hashimoto f3a62c694d
terraform: when promoting non-CBD to CBD, mark the config as such
Fixes #10439

When a CBD resource depends on a non-CBD resource, the non-CBD resource
is auto-promoted to CBD. This was done in
cf3a259. This PR makes it so that we
also set the config CBD to true. This causes the proper runtime
execution behavior to occur where we depose state and so on.

So in addition to simple graph edge tricks we also treat the non-CBD
resources as CBD resources.
2016-12-02 09:46:04 -05:00
..
test-fixtures terraform: when promoting non-CBD to CBD, mark the config as such 2016-12-02 09:46:04 -05:00
context_apply_test.go terraform: when promoting non-CBD to CBD, mark the config as such 2016-12-02 09:46:04 -05:00
context_components.go terraform: switch to a component factory 2016-10-11 22:17:29 +08:00
context_import_test.go nitpicks for #10310 2016-11-23 09:40:11 -08:00
context_import.go Implements import with specified provider 2016-11-23 11:58:58 +01:00
context_input_test.go Allow the HCL input when prompted 2016-08-10 11:14:31 -04:00
context_plan_test.go terraform: shadow errors with UUID() must be ignored 2016-11-14 10:20:26 -08:00
context_refresh_test.go terraform: test that data sources can reference other data sources 2016-10-23 18:53:00 -07:00
context_test.go terraform: verify version requirements from configuration 2016-11-12 16:50:26 -08:00
context_validate_test.go terraform: use the new TypeUnknown type from HIL 2016-11-09 14:28:15 -08:00
context.go Merge pull request #10093 from hashicorp/f-console 2016-11-14 11:53:49 -08:00
debug_test.go Remove the dot graphs from the debug log, 2016-11-15 11:11:53 -05:00
debug.go Remove the dot graphs from the debug log, 2016-11-15 11:11:53 -05:00
diff_test.go terraform: add more Same test cases to cover #9171 2016-11-21 17:31:47 -08:00
diff.go terraform: Diff.Same should understand that Destroy might go false 2016-11-15 11:26:42 -08:00
edge_destroy.go terraform: starting CBD, destroy edge for the destroy relationship 2016-10-19 13:38:52 -07:00
eval_apply.go Fix race on Provisioner.RawConfig 2016-09-26 14:34:05 -04:00
eval_check_prevent_destroy.go terraform: prevent_destroy works for decreasing count 2016-10-28 21:31:47 -04:00
eval_context_builtin_test.go terraform: provider input should be scoped by path 2015-06-24 09:34:21 -07:00
eval_context_builtin.go terraform: component uid includes the path 2016-10-11 22:17:29 +08:00
eval_context_mock.go core: Use native HIL maps instead of flatmaps 2016-05-10 14:49:13 -04:00
eval_context.go core: Use native HIL maps instead of flatmaps 2016-05-10 14:49:13 -04:00
eval_count_boundary.go terraform: new graph fixes ".0" and "" boundaries on counts 2016-10-19 13:38:52 -07:00
eval_count_computed.go terraform: detect compute counts and show a nicer error 2016-11-11 11:07:17 -08: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_test.go terraform: destroy node should not create 2015-02-24 22:45:47 -08:00
eval_diff.go Revert "[WIP] core: Log diff mismatch using spew instead of %#v" 2016-11-15 11:53:28 -08:00
eval_error.go core: [refactor] store Deposed resource instances as a list 2015-03-04 12:25:59 -06:00
eval_filter_operation.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_filter.go terraform: more eval stuff 2015-02-19 12:07:54 -08:00
eval_if.go core: [refactor] pull Deposed out of Tainted list 2015-03-04 12:25:47 -06:00
eval_import_state.go terraform: import verifies the refresh results in non-nil state 2016-05-11 13:02:36 -07:00
eval_interpolate_test.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_interpolate.go Module variables not being interpolated 2016-05-23 13:44:09 -04:00
eval_noop.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_output_test.go Check for multi-values maps in output too 2016-10-07 15:09:03 -04:00
eval_output.go Check for multi-values maps in output too 2016-10-07 15:09:03 -04:00
eval_provider_test.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
eval_provider.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
eval_provisioner_test.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
eval_provisioner.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
eval_read_data.go core: don't force data resource id diff to be empty 2016-09-24 12:48:58 -07:00
eval_refresh.go providers/aws: security group import imports rules 2016-05-11 13:02:36 -07:00
eval_resource.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_sequence_test.go terraform: Refresh, Read/Write state 2015-02-19 12:08:00 -08:00
eval_sequence.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_state_test.go Add tests and fix last issues 2016-05-26 19:56:03 -05:00
eval_state.go terraform: write lock on post state updates 2016-11-21 15:21:35 -08:00
eval_test.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_validate_test.go terraform: ResourceConfig reimplementation for TypeUnknown 2016-11-09 14:28:16 -08:00
eval_validate.go core: rerun resource validation before plan and apply 2016-07-01 13:12:57 -05:00
eval_variable_test.go terraform: allow literal maps to be passed to modules 2016-07-06 09:52:32 -05:00
eval_variable.go core: Set all unknown keys to UnknownVariableValue 2016-07-08 16:44:40 +01:00
eval.go core: demote early exit log from ERROR -> DEBUG 2016-02-24 09:58:33 -06:00
evaltree_provider.go terraform: providers should input/config on import 2016-05-11 13:02:34 -07:00
graph_builder_apply_test.go terraform: new apply graph creates provisioners in modules 2016-11-03 10:25:11 -07:00
graph_builder_apply.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -05:00
graph_builder_destroy_plan.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -05:00
graph_builder_import.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -05:00
graph_builder_plan_test.go terraform: tests for the plan graph builder 2016-11-08 13:59:26 -08:00
graph_builder_plan.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -05:00
graph_builder_test.go fix CreateBeforeDestroy with datasources 2016-11-03 17:08:24 -04:00
graph_builder.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -05:00
graph_config_node_module_test.go implement dag.Subgrapher interface 2016-11-14 08:50:34 -05:00
graph_config_node_module.go Remove dot package 2016-11-14 08:50:34 -05:00
graph_config_node_output.go Interpolation also skipped during Validate phase 2016-05-23 13:44:13 -04:00
graph_config_node_provider.go Remove dot package 2016-11-14 08:50:34 -05:00
graph_config_node_resource.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -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_test.go terraform: set variables in the proper location 2015-05-01 16:29:19 -07:00
graph_config_node_variable.go terraform: Filter untargeted variable nodes 2016-07-29 16:55:30 -05:00
graph_config_node.go terraform: TargetsTransformer on destroy plan 2016-10-22 12:12:30 -07:00
graph_dot_test.go Remove dot package 2016-11-14 08:50:34 -05:00
graph_dot.go Remove dot package 2016-11-14 08:50:34 -05:00
graph_interface_subgraph.go terraform: subpath context setting 2015-05-01 14:19:32 -07:00
graph_test.go terraform: GraphWalkerPanicwrap catches panics during graph walks 2016-11-03 12:08:55 -07:00
graph_walk_context.go Replace DebugGraphs with the Graph's methods 2016-11-14 08:52:18 -05:00
graph_walk_operation.go terraform: start Import function, totally untested 2016-05-11 13:02:30 -07:00
graph_walk_test.go terraform: trying this graphwalker thing 2015-02-19 12:07:56 -08:00
graph_walk.go Replace DebugGraphs with the Graph's methods 2016-11-14 08:52:18 -05:00
graph.go Remove the dot graphs from the debug log, 2016-11-15 11:11:53 -05:00
graphnodeconfigtype_string.go Reflect new comment format in stringer.go 2015-11-09 11:38:51 -05:00
hook_mock.go terraform: deposed should trigger PostApply hook 2016-10-30 15:24:20 -07:00
hook_stop_test.go terraform: stopHook and tests 2014-07-02 16:16:38 -07:00
hook_stop.go terraform: import state ID should be sent to hook 2016-05-11 13:02:35 -07:00
hook_test.go terraform: initial hook impl 2014-06-26 16:52:15 -07:00
hook.go terraform: import state ID should be sent to hook 2016-05-11 13:02:35 -07:00
instancetype_string.go Reflect new comment format in stringer.go 2015-11-09 11:38:51 -05:00
instancetype.go core: formalize resource addressing 2015-03-31 15:04:10 -05:00
interpolate_test.go terraform: when returning a raw attribute value, use hil conversion 2016-11-10 17:16:45 -08:00
interpolate.go terraform: improve error messages to assist REPL 2016-11-13 23:17:04 -08:00
node_count_boundary.go terraform: new graph fixes ".0" and "" boundaries on counts 2016-10-19 13:38:52 -07:00
node_module_destroy.go terraform: destroy module nodes show up in plan destroy 2016-10-22 12:12:29 -07:00
node_module_variable_test.go terraform: tests for module variable node 2016-10-19 13:38:51 -07:00
node_module_variable.go terraform: tests for module variable node 2016-10-19 13:38:51 -07:00
node_output_orphan.go terraform: prune orphan outputs in old graph 2016-11-08 13:24:09 -08:00
node_output.go terraform: output nodes reference depends_on values 2016-11-11 18:16:04 -08:00
node_provider_abstract.go terraform: disable providers in new apply graph 2016-10-19 14:54:00 -07:00
node_provider_disabled.go terraform: disable providers in new apply graph 2016-10-19 14:54:00 -07:00
node_provider.go terraform: provider depends on config references 2016-10-19 13:38:52 -07:00
node_resource_abstract.go terraform: references can have backups 2016-11-08 13:59:30 -08:00
node_resource_apply.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
node_resource_destroy_test.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
node_resource_destroy.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
node_resource_plan_destroy.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
node_resource_plan_instance.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
node_resource_plan_orphan.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
node_resource_plan.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -05:00
node_root_variable.go terraform: RootVariableTransform 2016-10-19 13:38:51 -07:00
path.go terraform: module inputs are passed through to subgraphs 2015-02-19 12:08:01 -08:00
plan_test.go core: Convert context vars to map[string]interface{} 2016-07-18 13:02:54 -05:00
plan.go core: Convert context vars to map[string]interface{} 2016-07-18 13:02:54 -05:00
resource_address_test.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
resource_address.go terraform: Destroy node should only include deposed for specific index 2016-11-29 09:16:18 -08:00
resource_provider_mock_test.go terraform: provider mock should close itself to find bugs 2015-06-29 10:33:37 -07:00
resource_provider_mock.go terraform: implement Stop in the mock and shadow 2016-10-25 12:08:35 -07:00
resource_provider.go terraform: Stop API added to ResourceProvider 2016-10-25 12:09:44 -07:00
resource_provisioner_mock_test.go terraform: Adding mock resource provisioner 2014-07-10 11:38:56 -07:00
resource_provisioner_mock.go Make all terraform package tests pass under -race 2016-07-29 16:12:21 -04:00
resource_provisioner.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
resource_test.go Nested lists and maps fail in GetRaw 2016-11-28 09:04:12 -05:00
resource.go ResourceConfig.get should never return (nil, true) 2016-11-18 16:24:40 -05:00
semantics_test.go Allow map variables from json 2016-09-27 13:29:14 -04:00
semantics.go Allow map variables from json 2016-09-27 13:29:14 -04:00
shadow_components.go terraform: if components is closed, initialize closed components 2016-10-19 14:10:46 -07:00
shadow_context.go terraform: shadow errors with UUID() must be ignored 2016-11-14 10:20:26 -08:00
shadow_resource_provider_test.go terraform: ShadowError returns errors, not the close operation 2016-10-11 22:17:30 +08:00
shadow_resource_provider.go terraform: EvalInstanceInfo on data sources in new graph 2016-11-15 09:02:10 -08:00
shadow_resource_provisioner_test.go terraform: ResourceProvisioner shadow 2016-10-11 22:17:30 +08:00
shadow_resource_provisioner.go terraform: ResourceProvisioner shadow 2016-10-11 22:17:30 +08:00
shadow.go terraform: Shadow interface, properly string through errors at the right 2016-10-11 22:17:29 +08:00
state_add_test.go Set proper Mode when moving a data source in state 2016-11-21 18:26:29 -05:00
state_add.go Set proper Mode when moving a data source in state 2016-11-21 18:26:29 -05:00
state_filter_test.go terraform: test for querying count resources 2016-08-19 11:41:00 -04:00
state_filter.go terraform: filtering on name actually matches name 2016-08-15 14:36:23 -05:00
state_test.go An empty module in state can panic 2016-11-18 17:59:07 -05:00
state_upgrade_v1_to_v2.go Ensure better state normalization 2016-08-12 11:09:50 -04:00
state_upgrade_v2_to_v3.go core: Introduce state v3 and upgrade process 2016-06-09 10:49:49 +01:00
state_v1.go core: Introduce state v3 and upgrade process 2016-06-09 10:49:49 +01:00
state.go Move the state module cleanup from init to prune 2016-11-20 11:33:41 -05:00
terraform_test.go terraform: record dependency to self (other index) 2016-11-23 09:25:20 -08:00
transform_attach_config_provider.go terraform: configure provider aliases in the new apply graph 2016-11-04 16:51:52 -07:00
transform_attach_config_resource.go terraform: enable shadow graph and destroy resource mode with addr 2016-10-22 12:12:30 -07:00
transform_attach_state.go terraform: add destroy nodes, destroys kind of work 2016-10-19 13:38:51 -07:00
transform_config_flat_test.go terraform: FlatConfigTransformer 2016-10-19 13:38:53 -07:00
transform_config_flat.go terraform: CBD makes the proper edge connections for dependent resources 2016-10-19 13:38:53 -07:00
transform_config_old_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_config_old.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_config_test.go terraform: address go vet 2016-11-08 14:04:57 -08:00
transform_config.go terraform: ConfigTransformer 2016-11-08 13:59:25 -08:00
transform_count_boundary.go terraform: new graph fixes ".0" and "" boundaries on counts 2016-10-19 13:38:52 -07:00
transform_deposed.go terraform: deposed should trigger PostApply hook 2016-10-30 15:24:20 -07:00
transform_destroy_cbd_test.go terraform: CBD makes the proper edge connections for dependent resources 2016-10-19 13:38:53 -07:00
transform_destroy_cbd.go Make sure each GraphBuilder has a Name 2016-11-15 16:40:10 -05:00
transform_destroy_edge_test.go terraform: destroy edge must include resources through outputs 2016-11-11 14:29:19 -08:00
transform_destroy_edge.go terraform: fix typo 2016-11-14 09:34:21 -08:00
transform_destroy_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_destroy.go terraform: when promoting non-CBD to CBD, mark the config as such 2016-12-02 09:46:04 -05:00
transform_diff_test.go terraform: remove diff transformer test that no longer happens 2016-10-19 13:38:52 -07:00
transform_diff.go terraform: enable shadow graph and destroy resource mode with addr 2016-10-22 12:12:30 -07:00
transform_expand_test.go implement dag.Subgrapher interface 2016-11-14 08:50:34 -05:00
transform_expand.go implement dag.Subgrapher interface 2016-11-14 08:50:34 -05:00
transform_flatten_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_flatten.go remove various typos 2015-09-11 11:56:20 -07:00
transform_import_provider.go terraform: verify import providers only depend on vars 2016-11-09 15:09:13 -08:00
transform_import_state.go Implements import with specified provider 2016-11-23 11:58:58 +01:00
transform_module_destroy_old.go terraform: destroy module nodes show up in plan destroy 2016-10-22 12:12:29 -07:00
transform_module_variable_test.go terraform: module variables should be pruned if nothing depends on them 2016-11-04 18:58:03 -07:00
transform_module_variable.go terraform: module variables should be pruned if nothing depends on them 2016-11-04 18:58:03 -07:00
transform_noop_test.go terraform: PruneNoopTransformer 2015-07-20 08:57:34 -07:00
transform_noop.go terraform: remove print 2015-07-20 08:57:35 -07:00
transform_orphan_count_test.go terraform: proper "what to orphan" on zero/one boundary logic 2016-11-08 13:59:29 -08:00
transform_orphan_count.go terraform: fix a typo found during review 2016-11-09 08:10:09 -08:00
transform_orphan_output.go terraform: orphan outputs are deleted from the state 2016-10-19 13:38:52 -07:00
transform_orphan_resource_test.go terraform: transform for adding orphan resources + tests 2016-11-08 13:59:27 -08:00
transform_orphan_resource.go terraform: transform for adding orphan resources + tests 2016-11-08 13:59:27 -08:00
transform_orphan_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_orphan.go terraform: prevent_destroy works for decreasing count 2016-10-28 21:31:47 -04:00
transform_output_orphan_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_output_orphan.go terraform: orphan outputs are deleted from the state 2016-10-19 13:38:52 -07:00
transform_output.go terraform: get tests to not panic on failures 2016-10-19 13:38:51 -07:00
transform_provider_disable.go terraform: disable providers in new apply graph 2016-10-19 14:54:00 -07:00
transform_provider_old.go Remove dot package 2016-11-14 08:50:34 -05:00
transform_provider_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_provider.go Remove dot package 2016-11-14 08:50:34 -05:00
transform_provisioner_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_provisioner.go terraform: new apply graph creates provisioners in modules 2016-11-03 10:25:11 -07:00
transform_proxy_test.go terraform: GraphNodeProxy 2015-05-01 11:38:36 -07:00
transform_proxy.go terraform: proxy uses custom edge 2015-05-01 11:41:01 -07:00
transform_reference_test.go terraform: tests for ReferenceMap for module paths 2016-11-12 08:24:09 -08:00
transform_reference.go terraform: resources nested within a module must also be depended on 2016-11-12 15:38:28 -08:00
transform_resource_count.go terraform: expand count in plan 2016-11-08 13:59:26 -08:00
transform_resource_test.go terraform: ResourceTransformer to ResourceTransformerOld 2016-11-08 13:59:26 -08:00
transform_resource.go terraform: ResourceTransformer to ResourceTransformerOld 2016-11-08 13:59:26 -08:00
transform_root_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_root.go terraform: prune resources and variables 2015-07-20 08:57:34 -07:00
transform_state.go terraform: implement destroy planning basics from state 2016-10-22 12:12:29 -07:00
transform_targets_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_targets.go terraform: TargetsTransformer on destroy plan 2016-10-22 12:12:30 -07:00
transform_transitive_reduction_test.go terraform: PlanGraphBuilder 2016-11-08 13:59:17 -08:00
transform_transitive_reduction.go terraform: add TransitiveReductionTransformer 2015-02-27 19:18:04 -08:00
transform_variable.go terraform: RootVariableTransform 2016-10-19 13:38:51 -07:00
transform_vertex_test.go terraform: GraphVertexTransformers 2015-02-19 12:07:57 -08:00
transform_vertex.go terraform: GraphVertexTransformers 2015-02-19 12:07:57 -08:00
transform.go terraform: unify destroy/apply graph builders 2016-10-22 12:12:30 -07:00
ui_input_mock.go terraform: Input() asks for variable inputs 2014-09-28 23:37:36 -07:00
ui_input_prefix_test.go terraform: prefix the Id for configuring providers 2014-09-29 10:36:49 -07:00
ui_input_prefix.go terraform: Make output more machine-like 2014-09-29 12:52:48 -07:00
ui_input.go helper/scheam: support UI defaults 2014-09-29 14:00:35 -07:00
ui_output_callback_test.go terraform: provisioners 2015-02-19 12:08:06 -08:00
ui_output_callback.go terraform: provisioners 2015-02-19 12:08:06 -08:00
ui_output_mock_test.go terraform: UIOutput interface 2014-10-04 09:00:07 -07:00
ui_output_mock.go fmt 2014-10-10 14:50:35 -07:00
ui_output_provisioner_test.go terraform: no longer require uiOutput, do it auto in Hook 2014-10-04 16:24:07 -07:00
ui_output_provisioner.go terraform: no longer require uiOutput, do it auto in Hook 2014-10-04 16:24:07 -07:00
ui_output.go terraform: UIOutput interface 2014-10-04 09:00:07 -07:00
upgrade_state_v1_test.go Ensure better state normalization 2016-08-12 11:09:50 -04:00
upgrade_state_v2_test.go core: Add test for V2->V3 state upgrade 2016-06-09 11:16:34 +01:00
util_test.go terraform: Adding a semaphore implementation 2014-10-16 10:04:36 -07:00
util.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
variables_test.go Add failing test for GH-10155 2016-11-16 18:20:59 -05:00
variables.go Return an error for setting a non-map to a map 2016-11-17 11:10:43 -05:00
version_required.go terraform: verify version requirements from configuration 2016-11-12 16:50:26 -08:00
version.go release: clean up after v0.8.0-rc1 2016-11-23 18:42:12 +00:00
walkoperation_string.go terraform: generate 2016-05-11 13:02:30 -07:00