terraform/builtin/providers/test
Martin Atkins 332010fd56 plans/objchange: Fix handling of dynamic block placeholders
If a dynamic block (in the HCL dynamic block extension sense) has an
unknown value for its for_each argument, it gets expanded to a single
placeholder block with all of its attributes set to a unknown values.

We can use this as part of a heuristic to relax our object compatibility
checks for situations where the plan included an object that appears to
be (but isn't necessarily) such a placeholder, allowing for the fact that
the one placeholder block could be replaced with zero or more real blocks
once the for_each value is known.

Previously our heuristic was too strict: it would match only if the only
block present was a dynamic placeholder. In practice, users may mix
dynamic blocks with static blocks of the same type, so we need to be more
liberal to avoid generating incorrect incompatibility errors in such
cases.
2019-05-02 14:08:40 -07:00
..
data_source.go failing tests when using resources with count 2018-12-17 12:15:43 -05:00
data_source_label.go provider/test: allow assigning a label to each instance 2017-05-11 10:52:51 -07:00
data_source_label_test.go provider/test: allow assigning a label to each instance 2017-05-11 10:52:51 -07:00
data_source_test.go core: Specialized errors for incorrect indexes in resource reference 2018-12-20 13:55:42 -08:00
diff_apply_test.go helper/schema: Use a more targeted shim for nested set diff applying 2019-04-17 07:47:31 -07:00
provider.go core: Keep old value on error even for delete 2019-04-17 07:40:15 -07:00
provider_test.go core: Fix issues with ignore_changes 2016-03-21 14:20:36 -05:00
resource.go delete unknown values from apply config altogether 2019-04-22 18:06:26 -04:00
resource_computed_set.go stop removing empty flatmap containers 2019-03-11 15:14:29 -04:00
resource_computed_set_test.go remove the partially-known ~ set sigil in diffs 2019-03-04 17:36:30 -05:00
resource_config_mode.go helper/schema: Use a more targeted shim for nested set diff applying 2019-04-17 07:47:31 -07:00
resource_config_mode_test.go helper/schema: Use a more targeted shim for nested set diff applying 2019-04-17 07:47:31 -07:00
resource_data_dep_test.go udpate test configs to work with hcl2 2018-10-16 19:14:54 -07:00
resource_dataproc_cluster_test.go add test for complex schema diff apply 2019-03-12 12:04:35 -04:00
resource_defaults.go add tests for nested default values 2019-01-17 18:51:18 -05:00
resource_defaults_test.go add more tests 2019-01-23 20:03:10 -05:00
resource_deprecated.go add tests for deprecated/removed attrs 2019-01-12 10:41:04 -05:00
resource_deprecated_test.go add tests for deprecated/removed attrs 2019-01-12 10:41:04 -05:00
resource_diff_suppress.go computed value wasn't being set 2018-11-27 08:54:15 -05:00
resource_diff_suppress_test.go verify DiffSuppresFunc behavior 2018-11-16 11:17:23 -05:00
resource_force_new.go add provider tests for force-new with a map 2018-10-31 13:42:28 -04:00
resource_force_new_test.go add provider tests for force-new with a map 2018-10-31 13:42:28 -04:00
resource_gh12183.go helper/schema: Opt-in panic on invalid ResourceData.Set 2017-11-08 10:05:11 +00:00
resource_gh12183_test.go udpate test configs to work with hcl2 2018-10-16 19:14:54 -07:00
resource_import_other.go plugin: Use correct schema when marshaling imported resource objects 2019-02-01 15:22:54 -08:00
resource_import_other_test.go plugin: Use correct schema when marshaling imported resource objects 2019-02-01 15:22:54 -08:00
resource_import_removed.go helper/resource: Ignore Removed attributes for ImportStateVerify 2019-04-16 11:14:49 -07:00
resource_import_removed_test.go helper/resource: Ignore Removed attributes for ImportStateVerify 2019-04-16 11:14:49 -07:00
resource_list.go add test provider coverage around unknown vals 2019-03-29 13:56:42 -04:00
resource_list_set.go add a trouble test schema from the aws provider 2019-02-13 19:09:46 -05:00
resource_list_set_test.go add a trouble test schema from the aws provider 2019-02-13 19:09:46 -05:00
resource_list_test.go plans/objchange: Fix handling of dynamic block placeholders 2019-05-02 14:08:40 -07:00
resource_map.go test that computed maps are applied correctly 2019-04-23 12:31:19 -04:00
resource_map_test.go test that computed maps are applied correctly 2019-04-23 12:31:19 -04:00
resource_nested.go add more tests for a computed nested list and set 2019-01-15 11:55:02 -05:00
resource_nested_id.go only force top-level id's back to unknown 2019-02-05 16:16:08 -05:00
resource_nested_id_test.go only force top-level id's back to unknown 2019-02-05 16:16:08 -05:00
resource_nested_set.go provider tests for empty values 2019-01-08 16:26:22 -05:00
resource_nested_set_test.go Additional tests with interpolated values 2019-02-07 20:23:39 -05:00
resource_nested_test.go add more tests for a computed nested list and set 2019-01-15 11:55:02 -05:00
resource_state_func.go add test fetching computed set value by address 2019-04-10 09:42:54 -04:00
resource_state_func_test.go add test fetching computed set value by address 2019-04-10 09:42:54 -04:00
resource_test.go delete unknown values from apply config altogether 2019-04-22 18:06:26 -04:00
resource_timeout.go add timeout tests to the test provider 2018-10-30 13:14:08 -04:00
resource_timeout_test.go add timeout tests to the test provider 2018-10-30 13:14:08 -04:00
resource_undeletable.go core: Keep old value on error even for delete 2019-04-17 07:40:15 -07:00
resource_with_custom_diff.go provider/test: Added complex-ish list testing 2017-11-01 14:25:32 -07:00
resource_with_custom_diff_test.go provider/test: Added complex-ish list testing 2017-11-01 14:25:32 -07:00
splat_flatten_test.go udpate test configs to work with hcl2 2018-10-16 19:14:54 -07:00