terraform/terraform
Martin Atkins e4a5d36127 core: EvalVariableBlock to decode maps and slices more carefully
Previously this function was depending on the mapstructure behavior of
failing with an error when trying to decode a map into a list or
vice-versa, but mapstructure's WeakDecode behavior changed so that it
will go to greater lengths to coerce the given value to fit into the
target type, causing us to mis-handle certain ambigous cases.

Here we exert a bit more control over what's going on by using 'reflect'
to first check whether we have a slice or map value and only then try
to decode into one with mapstructure. This allows us to still rely on
mapstructure's ability to decode nested structures but ensure that lists
and maps never get implicitly converted to each other.
2017-04-07 17:05:14 -07:00
..
test-fixtures terraform: convert empty path to root path in V1 state 2017-03-21 11:37:12 -07:00
context.go terraform: interpolate "terraform.env" 2017-03-13 16:14:27 -07:00
context_apply_test.go fix another hot lop in tests 2017-03-15 12:02:28 -04:00
context_components.go
context_graph_type.go terraform: wip moving validation to new graph 2017-01-25 12:28:07 -08:00
context_import.go terraform: switch to Context for stop, Stoppable provisioners 2017-01-26 15:03:27 -08:00
context_import_test.go terraform: import graph should setup parent refs to providers 2017-01-24 15:36:45 -08:00
context_input_test.go Add failing test for invalid interpolation 2017-03-16 10:35:18 -04:00
context_plan_test.go Correctly filter flatmapped values in diff 2017-03-21 09:11:54 -04:00
context_refresh_test.go terraform: unknown value for variables not set 2017-03-17 15:33:33 -07:00
context_test.go Add a failing test for missing keys in diff 2017-03-20 17:44:37 -04:00
context_validate_test.go Merge pull request #10934 from hashicorp/f-provisioner-stop 2017-01-30 12:53:15 -08:00
debug.go terraform: fix compilation by complying with interface 2017-01-20 20:45:06 -08:00
debug_test.go website: add destroy provisioners to getting started 2017-01-21 08:31:18 -08:00
diff.go Correctly filter flatmapped values in diff 2017-03-21 09:11:54 -04:00
diff_test.go terraform: ignore RequiresNew for collection removal in diff.Same 2017-02-06 17:46:48 -08:00
edge_destroy.go
eval.go
eval_apply.go terraform: introduce EvalApplyPre so that PreApply is called even for 2017-01-20 20:36:53 -08:00
eval_check_prevent_destroy.go
eval_context.go terraform: switch to Context for stop, Stoppable provisioners 2017-01-26 15:03:27 -08:00
eval_context_builtin.go terraform: switch to Context for stop, Stoppable provisioners 2017-01-26 15:03:27 -08:00
eval_context_builtin_test.go
eval_context_mock.go terraform: switch to Context for stop, Stoppable provisioners 2017-01-26 15:03:27 -08:00
eval_count.go
eval_count_boundary.go
eval_count_computed.go
eval_diff.go Correctly filter flatmapped values in diff 2017-03-21 09:11:54 -04:00
eval_diff_test.go
eval_error.go
eval_filter.go
eval_filter_operation.go
eval_if.go
eval_import_state.go
eval_interpolate.go
eval_interpolate_test.go
eval_noop.go
eval_output.go
eval_output_test.go
eval_provider.go core: Input walk shouldn't clobber dynamic provider config 2017-04-04 10:31:42 -07:00
eval_provider_test.go core: Input walk shouldn't clobber dynamic provider config 2017-04-04 10:31:42 -07:00
eval_provisioner.go
eval_provisioner_test.go
eval_read_data.go
eval_refresh.go
eval_resource.go
eval_sequence.go terraform: don't validate computed values in validate 2017-01-27 21:15:43 -08:00
eval_sequence_test.go
eval_state.go
eval_state_test.go
eval_test.go
eval_validate.go Detect and reject unknown attributes in "connection" blocks 2017-04-06 13:46:43 -07:00
eval_validate_selfref.go terraform: validate self references 2017-01-25 21:00:45 -08:00
eval_validate_selfref_test.go terraform: validate self references 2017-01-25 21:00:45 -08:00
eval_validate_test.go Detect and reject unknown attributes in "connection" blocks 2017-04-06 13:46:43 -07:00
eval_variable.go core: EvalVariableBlock to decode maps and slices more carefully 2017-04-07 17:05:14 -07:00
eval_variable_test.go core: basic test of EvalVariableBlock 2017-04-04 12:16:19 -07:00
evaltree_provider.go
graph.go terraform: remove ConnectDependents and related interfaces 2017-02-03 14:25:54 +01:00
graph_builder.go terraform: remove legacy graph builder 2017-01-26 15:18:42 -08:00
graph_builder_apply.go terraform: outputs should not be included if not targeted 2017-02-13 12:52:45 -08:00
graph_builder_apply_test.go terraform: outputs should not be included if not targeted 2017-02-13 12:52:45 -08:00
graph_builder_destroy_plan.go terraform: new Graph API that can return the graph for each op 2016-12-02 22:56:22 -05:00
graph_builder_import.go terraform: import graph should setup parent refs to providers 2017-01-24 15:36:45 -08:00
graph_builder_input.go terraform: wip moving validation to new graph 2017-01-25 12:28:07 -08:00
graph_builder_plan.go terraform: fixup a merge issue 2017-01-25 12:32:09 -08:00
graph_builder_plan_test.go terraform: don't include providers if not targeted 2017-02-17 09:21:29 -08:00
graph_builder_refresh.go terraform: handle count fields for data sources 2017-01-22 16:05:10 -08:00
graph_builder_test.go terraform: remove legacy graph builder 2017-01-26 15:18:42 -08:00
graph_builder_validate.go terraform: expand count on resources during validation 2017-01-25 12:39:08 -08:00
graph_dot.go
graph_dot_test.go terraform: remove ConnectDependents and related interfaces 2017-02-03 14:25:54 +01:00
graph_interface_subgraph.go
graph_test.go terraform: remove ConnectDependents and related interfaces 2017-02-03 14:25:54 +01:00
graph_walk.go
graph_walk_context.go terraform: string through the context meta 2017-03-13 16:21:09 -07:00
graph_walk_operation.go
graph_walk_test.go
graphtype_string.go Update stringer-generated files to new boilerplate 2017-03-29 08:07:06 -07:00
hook.go terraform: PostProvision hook gets the error from the provision step 2017-01-20 20:21:12 -08:00
hook_mock.go terraform: PostProvision hook gets the error from the provision step 2017-01-20 20:21:12 -08:00
hook_stop.go terraform: PostProvision hook gets the error from the provision step 2017-01-20 20:21:12 -08:00
hook_stop_test.go
hook_test.go
instancetype.go
instancetype_string.go Update stringer-generated files to new boilerplate 2017-03-29 08:07:06 -07:00
interpolate.go terraform: unknown value for variables not set 2017-03-17 15:33:33 -07:00
interpolate_test.go terraform: interpolate "terraform.env" 2017-03-13 16:14:27 -07:00
node_count_boundary.go
node_data_destroy.go terraform: data source on refresh should just delete from state 2017-02-03 20:58:03 +01:00
node_data_refresh.go terraform: convert StateDeps to use new structs 2017-01-26 20:47:20 -08:00
node_module_destroy.go
node_module_variable.go terraform: TargetsTransformer should preserve module variables 2016-12-12 20:59:14 -08:00
node_module_variable_test.go
node_output.go terraform: outputs should not be included if not targeted 2017-02-13 12:52:45 -08:00
node_output_orphan.go
node_provider.go terraform: refactor NodeApplyableProvider to use NodeAbstractProvider 2016-12-03 15:27:38 -08:00
node_provider_abstract.go terraform: don't include providers if not targeted 2017-02-17 09:21:29 -08:00
node_provider_disabled.go
node_provisioner.go terraform: new provisioner node 2017-01-26 21:02:55 -08:00
node_resource_abstract.go terraform: destroy ordering needs to handle destroy provisioner edges 2017-02-17 14:29:22 -08:00
node_resource_abstract_count.go terraform: don't validate computed values in validate 2017-01-27 21:15:43 -08:00
node_resource_apply.go terraform: convert StateDeps to use new structs 2017-01-26 20:47:20 -08:00
node_resource_destroy.go terraform: destroy resource should depend on destroy-time prov deps 2017-02-17 13:13:44 -08:00
node_resource_destroy_test.go
node_resource_plan.go terraform: handle count fields for data sources 2017-01-22 16:05:10 -08:00
node_resource_plan_destroy.go
node_resource_plan_instance.go terraform: convert StateDeps to use new structs 2017-01-26 20:47:20 -08:00
node_resource_plan_orphan.go
node_resource_refresh.go terraform: data source on refresh should just delete from state 2017-02-03 20:58:03 +01:00
node_resource_validate.go Detect and reject unknown attributes in "connection" blocks 2017-04-06 13:46:43 -07:00
node_root_variable.go
path.go
plan.go terraform: support backends in the state 2017-01-26 14:33:49 -08:00
plan_test.go terraform: add Meta field to diffs 2017-01-31 11:50:37 -08:00
resource.go
resource_address.go terraform: test case for #10982 (passes) 2017-02-13 13:06:22 -08:00
resource_address_test.go terraform: test case for #10982 (passes) 2017-02-13 13:06:22 -08:00
resource_provider.go
resource_provider_mock.go move TestReset mock from terraform to helper 2017-03-08 17:48:11 -05:00
resource_provider_mock_test.go
resource_provisioner.go terraform: switch to Context for stop, Stoppable provisioners 2017-01-26 15:03:27 -08:00
resource_provisioner_mock.go terraform: switch to Context for stop, Stoppable provisioners 2017-01-26 15:03:27 -08:00
resource_provisioner_mock_test.go
resource_test.go
semantics.go terraform: remove GraphNodeModule 2017-01-26 20:01:39 -08:00
semantics_test.go terraform: user friendly error when using old map overrides 2016-12-09 15:58:24 -05:00
shadow.go
shadow_components.go
shadow_context.go terraform: string through the context meta 2017-03-13 16:21:09 -07:00
shadow_resource_provider.go
shadow_resource_provider_test.go
shadow_resource_provisioner.go terraform: switch to Context for stop, Stoppable provisioners 2017-01-26 15:03:27 -08:00
shadow_resource_provisioner_test.go
state.go delegate BackendState.Rehash to config.Backend 2017-03-29 18:01:03 -04:00
state_add.go
state_add_test.go
state_filter.go fix sorting of module resources during state mv 2017-02-23 18:27:16 -05:00
state_filter_test.go terraform: StateFilter handles cases where ResourceState has no type 2017-01-21 10:24:03 -08:00
state_test.go missing defaults in sort 2017-02-25 16:50:24 -05:00
state_upgrade_v1_to_v2.go terraform: convert empty path to root path in V1 state 2017-03-21 11:37:12 -07:00
state_upgrade_v1_to_v2_test.go terraform: convert empty path to root path in V1 state 2017-03-21 11:37:12 -07:00
state_upgrade_v2_to_v3.go terraform: V1 to V2 upgrade should treat nil path as root path 2017-03-21 11:12:44 -07:00
state_v1.go
terraform_test.go Fix test that relied on empty Old diff 2017-03-20 17:44:38 -04:00
testing.go terraform: support backends in the state 2017-01-26 14:33:49 -08:00
transform.go
transform_attach_config_provider.go
transform_attach_config_resource.go
transform_attach_state.go terraform: passing test for destroy edge for module only 2017-02-07 19:12:03 -08:00
transform_config.go terraform: ConfigTransformer has Unique and mode filters 2017-01-22 12:58:18 -08:00
transform_config_flat.go
transform_config_flat_test.go
transform_config_old.go terraform: remove config transformer old 2017-01-26 19:57:46 -08:00
transform_config_test.go terraform: ConfigTransformer has Unique and mode filters 2017-01-22 12:58:18 -08:00
transform_count_boundary.go
transform_deposed.go terraform: introduce EvalApplyPre so that PreApply is called even for 2017-01-20 20:36:53 -08:00
transform_destroy_cbd.go terraform: CBD edge should ignore "index" 2017-02-07 10:53:12 -08:00
transform_destroy_cbd_test.go terraform: CBD edge should ignore "index" 2017-02-07 10:53:12 -08:00
transform_destroy_edge.go terraform: destroy ordering needs to handle destroy provisioner edges 2017-02-17 14:29:22 -08:00
transform_destroy_edge_test.go terraform: passing test for destroy edge for module only 2017-02-07 19:12:03 -08:00
transform_diff.go
transform_diff_test.go
transform_expand.go terraform: more dead code removal 2017-01-26 19:47:02 -08:00
transform_expand_test.go
transform_import_provider.go
transform_import_state.go
transform_module_variable.go terraform: add module vars after providers to see references 2016-12-13 21:22:21 -08:00
transform_module_variable_test.go
transform_orphan_count.go
transform_orphan_count_test.go
transform_orphan_output.go
transform_orphan_resource.go
transform_orphan_resource_test.go
transform_output.go
transform_provider.go terraform: close transform should not include untargeted providers 2017-02-17 09:27:47 -08:00
transform_provider_disable.go
transform_provider_test.go terraform: close transform should not include untargeted providers 2017-02-17 09:27:47 -08:00
transform_provisioner.go terraform: remove flatten, forever 2017-01-26 21:03:27 -08:00
transform_provisioner_test.go terraform: new provisioner node 2017-01-26 21:02:55 -08:00
transform_reference.go terraform: remove node module file 2017-01-26 20:05:42 -08:00
transform_reference_test.go
transform_resource_count.go
transform_root.go terraform: provider transform is converted to new graph world view 2017-01-26 20:58:22 -08:00
transform_root_test.go terraform: convert root transform test to use new config transform 2017-01-26 19:40:46 -08:00
transform_state.go
transform_targets.go terraform: remove graph config node file 2017-01-26 20:16:06 -08:00
transform_targets_test.go terraform: convert all tests to use the new config transformer 2017-01-26 19:56:16 -08:00
transform_transitive_reduction.go
transform_transitive_reduction_test.go terraform: convert all tests to use the new config transformer 2017-01-26 19:56:16 -08:00
transform_variable.go
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
upgrade_state_v1_test.go
upgrade_state_v2_test.go
util.go "external" data source, for integrating with external programs (#8768) 2016-12-05 17:24:57 +00:00
util_test.go "external" data source, for integrating with external programs (#8768) 2016-12-05 17:24:57 +00:00
variables.go
variables_test.go
version.go release: clean up after v0.9.2 2017-03-28 10:05:25 +00:00
version_required.go
walkoperation_string.go Update stringer-generated files to new boilerplate 2017-03-29 08:07:06 -07:00