terraform/terraform
Mitchell Hashimoto 8c9097f454
terraform: orphaned grandchild module inherits provider config
This fixes an issue where orphaned grandchild modules don't properly
inherit their provider configurations from grandparents. I found this
while working on shadow graphs (the shadow graph actually caught an
inconsistency between runs and exposed this bug!), so I'm unsure if this
affects any issue.

To better explain the issue, I'll diagram things.

Here is a hierarchy that _works_ (w/o this PR):

```
root
|-- child1 (orphan)
|-- child2
    |-- grandchild
```

All modules in this case will successfully inherit provider
configurations from "root".

Here is a hierarchy that _doesn't work without this PR_:

```
root
|-- child1 (orphan)
    |-- grandchild (orphan)
```

In this case, `child1` does successfully inherit the provider from root,
but `grandchild` _will not_ unless `child1` had resources. If `child1`
has no resources, it wouldn't inherit anything. This PR fixes that.
2016-10-11 15:51:27 +08:00
..
test-fixtures Allow map variables from json 2016-09-27 13:29:14 -04:00
context.go terraform: refactor var loading out to a helper 2016-08-17 11:10:26 -07:00
context_apply_test.go terraform: orphaned grandchild module inherits provider config 2016-10-11 15:51:27 +08:00
context_import.go terraform: Module option to Import to add module to graph 2016-05-11 13:02:37 -07:00
context_import_test.go terraform: import specific index works [GH-7691] 2016-08-19 19:14:33 -04:00
context_input_test.go Allow the HCL input when prompted 2016-08-10 11:14:31 -04:00
context_plan_test.go Add a context test for a datasource with count 2016-09-03 13:08:41 -07:00
context_refresh_test.go core: Add missing OutputStates in synthetic state 2016-06-22 17:06:41 +03:00
context_test.go unify some of the test code 2016-08-10 11:37:55 -04:00
context_validate_test.go config: count can't be a SimpleVariable 2016-08-16 13:48:12 -07:00
diff.go Fix vet errors found with Go 1.7 2016-08-16 18:03:22 -07:00
diff_test.go terraform: diffs with only tainted set are non-empty 2016-08-12 17:37:49 -05:00
eval.go core: demote early exit log from ERROR -> DEBUG 2016-02-24 09:58:33 -06:00
eval_apply.go Fix race on Provisioner.RawConfig 2016-09-26 14:34:05 -04:00
eval_check_prevent_destroy.go Make all terraform package tests pass under -race 2016-07-29 16:12:21 -04:00
eval_context.go core: Use native HIL maps instead of flatmaps 2016-05-10 14:49:13 -04:00
eval_context_builtin.go Module variables not being interpolated 2016-05-23 13:44:09 -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_mock.go core: Use native HIL maps instead of flatmaps 2016-05-10 14:49:13 -04: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 Add wildcard (match all) support to ignore_changes (#8599) 2016-09-02 15:44:35 +02:00
eval_diff_test.go terraform: destroy node should not create 2015-02-24 22:45:47 -08:00
eval_error.go core: [refactor] store Deposed resource instances as a list 2015-03-04 12:25:59 -06:00
eval_filter.go terraform: more eval stuff 2015-02-19 12:07:54 -08:00
eval_filter_operation.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -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.go Module variables not being interpolated 2016-05-23 13:44:09 -04:00
eval_interpolate_test.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_noop.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_output.go core: Use OutputState in JSON instead of map 2016-05-18 13:25:20 -05:00
eval_provider.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
eval_provider_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_provisioner_test.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
eval_read_data.go Make all terraform package tests pass under -race 2016-07-29 16:12:21 -04: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.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_state.go Add tests and fix last issues 2016-05-26 19:56:03 -05:00
eval_state_test.go Add tests and fix last issues 2016-05-26 19:56:03 -05:00
eval_test.go terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
eval_validate.go core: rerun resource validation before plan and apply 2016-07-01 13:12:57 -05:00
eval_validate_test.go core: rerun resource validation before plan and apply 2016-07-01 13:12:57 -05:00
eval_variable.go core: Set all unknown keys to UnknownVariableValue 2016-07-08 16:44:40 +01:00
eval_variable_test.go terraform: allow literal maps to be passed to modules 2016-07-06 09:52:32 -05:00
evaltree_provider.go terraform: providers should input/config on import 2016-05-11 13:02:34 -07:00
graph.go core: fix deadlock when dependable node replaced with non-dependable one 2015-08-10 15:50:36 -05:00
graph_builder.go core: Print node types in traces 2016-04-13 10:20:18 -07:00
graph_builder_import.go terraform: Module option to Import to add module to graph 2016-05-11 13:02:37 -07:00
graph_builder_test.go Add tests and fix last issues 2016-05-26 19:56:03 -05:00
graph_config_node.go terraform: fill in more flat interfaces 2015-05-01 15:28:41 -07:00
graph_config_node_module.go core: Use native HIL maps instead of flatmaps 2016-05-10 14:49:13 -04:00
graph_config_node_module_test.go core: Remove module input transformer 2016-04-13 11:15:24 -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 terraform: providers in flattened graphs should depend on the parent 2015-05-01 16:41:49 -07:00
graph_config_node_resource.go Make all terraform package tests pass under -race 2016-07-29 16:12:21 -04: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: Filter untargeted variable nodes 2016-07-29 16:55:30 -05: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 Fix three trivial errors 'go vet' discovered. 2015-05-13 21:23:07 -04:00
graph_dot_test.go removed extra parentheses 2015-10-08 15:48:04 +03:00
graph_interface_subgraph.go terraform: subpath context setting 2015-05-01 14:19:32 -07:00
graph_test.go core: fix deadlock when dependable node replaced with non-dependable one 2015-08-10 15:50:36 -05:00
graph_walk.go terraform: subpath context setting 2015-05-01 14:19:32 -07:00
graph_walk_context.go core: Use native HIL maps instead of flatmaps 2016-05-10 14:49:13 -04: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
graphnodeconfigtype_string.go Reflect new comment format in stringer.go 2015-11-09 11:38:51 -05:00
hook.go terraform: import state ID should be sent to hook 2016-05-11 13:02:35 -07:00
hook_mock.go Make all terraform package tests pass under -race 2016-07-29 16:12:21 -04:00
hook_stop.go terraform: import state ID should be sent to hook 2016-05-11 13:02:35 -07:00
hook_stop_test.go terraform: stopHook and tests 2014-07-02 16:16:38 -07:00
hook_test.go terraform: initial hook impl 2014-06-26 16:52:15 -07:00
instancetype.go core: formalize resource addressing 2015-03-31 15:04:10 -05:00
instancetype_string.go Reflect new comment format in stringer.go 2015-11-09 11:38:51 -05:00
interpolate.go terraform: self.count works in interpolations [GH-5283] 2016-08-31 11:36:51 -07:00
interpolate_test.go core: Fix interpolation tests with nested lists 2016-07-11 17:02:12 -06:00
path.go terraform: module inputs are passed through to subgraphs 2015-02-19 12:08:01 -08:00
plan.go core: Convert context vars to map[string]interface{} 2016-07-18 13:02:54 -05:00
plan_test.go core: Convert context vars to map[string]interface{} 2016-07-18 13:02:54 -05:00
resource.go terraform: ResourceConfig.Equal and tests 2016-09-27 18:52:32 -07:00
resource_address.go core: ResourceAddress supports data resources 2016-05-14 08:26:36 -07:00
resource_address_test.go core: ResourceAddress supports data resources 2016-05-14 08:26:36 -07:00
resource_provider.go core: New ResourceProvider methods for data resources 2016-05-14 08:26:36 -07:00
resource_provider_mock.go core: New ResourceProvider methods for data resources 2016-05-14 08:26:36 -07: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_test.go terraform: add ResourceProviderFactoryFixed 2014-07-10 09:46:21 -07:00
resource_provisioner.go core: close provider/provisioner connections 2015-06-19 21:52:50 +02:00
resource_provisioner_mock.go Make all terraform package tests pass under -race 2016-07-29 16:12:21 -04:00
resource_provisioner_mock_test.go terraform: Adding mock resource provisioner 2014-07-10 11:38:56 -07:00
resource_test.go terraform: ResourceConfig.Equal and tests 2016-09-27 18:52:32 -07:00
semantics.go Allow map variables from json 2016-09-27 13:29:14 -04:00
semantics_test.go Allow map variables from json 2016-09-27 13:29:14 -04:00
state.go create some unlocked methods for State 2016-09-16 09:59:04 -04:00
state_add.go Add an InstanceState.Set method to set all fields 2016-08-25 14:41:51 -04:00
state_add_test.go terraform: state mv "foo" to "foo.0" with single count 2016-08-19 11:54:53 -04:00
state_filter.go terraform: filtering on name actually matches name 2016-08-15 14:36:23 -05:00
state_filter_test.go terraform: test for querying count resources 2016-08-19 11:41:00 -04:00
state_test.go Update reflectwalk vendor to fix State.DeepCopy 2016-09-27 19:52:12 -07: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
terraform_test.go Add wildcard (match all) support to ignore_changes (#8599) 2016-09-02 15:44:35 +02:00
transform.go terraform: GraphVertexTransformers 2015-02-19 12:07:57 -08:00
transform_config.go Type check variables between modules (#6185) 2016-04-15 12:07:54 -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 Add operation walkDestroy 2015-10-03 14:16:40 -07:00
transform_destroy.go Change taint behaviour to act as a normal resource 2016-05-26 19:55:26 -05:00
transform_destroy_test.go Add tests and fix last issues 2016-05-26 19:56:03 -05:00
transform_expand.go terraform: orphan module should flatten 2015-05-14 20:54:33 -07:00
transform_expand_test.go terraform: fix tests 2015-02-19 12:08:01 -08:00
transform_flatten.go remove various typos 2015-09-11 11:56:20 -07:00
transform_flatten_test.go terraform: add module destroy node to graph 2015-05-01 18:26:35 -07:00
transform_import_state.go terraform: import specific index works [GH-7691] 2016-08-19 19:14:33 -04:00
transform_module.go core: Remove module input transformer 2016-04-13 11:15:24 -05:00
transform_module_test.go core: Remove module input transformer 2016-04-13 11:15:24 -05:00
transform_noop.go terraform: remove print 2015-07-20 08:57:35 -07:00
transform_noop_test.go terraform: PruneNoopTransformer 2015-07-20 08:57:34 -07:00
transform_orphan.go Change taint behaviour to act as a normal resource 2016-05-26 19:55:26 -05:00
transform_orphan_test.go core: Orphan addressing / targeting 2016-01-19 17:48:44 -06:00
transform_output.go Add operation walkDestroy 2015-10-03 14:16:40 -07:00
transform_output_test.go core: Use OutputState in JSON instead of map 2016-05-18 13:25:20 -05:00
transform_provider.go terraform: orphaned grandchild module inherits provider config 2016-10-11 15:51:27 +08:00
transform_provider_test.go terraform: more provider transform tests 2016-05-11 13:02:32 -07:00
transform_provisioner.go Cleaning up the PruneProvisionerTransformer 2016-02-04 21:32:10 +01:00
transform_provisioner_test.go Cleaning up the PruneProvisionerTransformer 2016-02-04 21:32:10 +01:00
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: prefix destroy resources with module path [GH-2767] 2016-08-22 13:33:11 -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: prune resources and variables 2015-07-20 08:57:34 -07:00
transform_root_test.go terraform: validation in progress 2015-02-19 12:07:55 -08:00
transform_targets.go core: Fixed variables not being in scope for destroy -target on modules 2016-09-23 19:05:40 -04: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 terraform: GraphVertexTransformers 2015-02-19 12:07:57 -08:00
transform_vertex_test.go terraform: GraphVertexTransformers 2015-02-19 12:07:57 -08:00
ui_input.go helper/scheam: support UI defaults 2014-09-29 14:00:35 -07:00
ui_input_mock.go terraform: Input() asks for variable inputs 2014-09-28 23:37:36 -07:00
ui_input_prefix.go terraform: Make output more machine-like 2014-09-29 12:52:48 -07:00
ui_input_prefix_test.go terraform: prefix the Id for configuring providers 2014-09-29 10:36:49 -07:00
ui_output.go terraform: UIOutput interface 2014-10-04 09:00:07 -07:00
ui_output_callback.go terraform: provisioners 2015-02-19 12:08:06 -08:00
ui_output_callback_test.go terraform: provisioners 2015-02-19 12:08:06 -08:00
ui_output_mock.go fmt 2014-10-10 14:50:35 -07:00
ui_output_mock_test.go terraform: UIOutput interface 2014-10-04 09:00: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_provisioner_test.go terraform: no longer require uiOutput, do it auto in Hook 2014-10-04 16:24: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.go Support for multiple providers of the same type 2015-04-20 14:14:34 -07:00
util_test.go terraform: Adding a semaphore implementation 2014-10-16 10:04:36 -07:00
variables.go terraform: refactor var loading out to a helper 2016-08-17 11:10:26 -07:00
variables_test.go terraform: fix vet 2016-08-17 12:03:21 -07:00
version.go release: clean up after v0.7.5 2016-10-06 17:57:23 +00:00
walkoperation_string.go terraform: generate 2016-05-11 13:02:30 -07:00