terraform/config
James Nugent c6e03cba96 core: Fix slice element keys on interpolateWalk
Part of the interpolation walk is to detect keys which involve computed
values and therefore cannot be resolved at this time. The interplation
walker keeps sufficient state to be able to populate the ResourceConfig
with a slice of such keys.

Previously they didn't take slice indexes into account, so in the
following case:

```
"services": []interface{}{
    map[string]interface{}{
        "elb": "___something computed___",
    },
    map[string]interface{}{
        "elb": "___something else computed___",
    },
    map[string]interface{}{
        "elb": "not computed",
    },
}
```

Unknown keys would be populated as follows:

```
services.elb
services.elb
```

This is not sufficient information to be useful, as it is impossible to
distinguish which of the `services.elb`s are unknown vs not.

This commit therefore retains the slice indexes as part of the key for
unknown keys - producing for the example above:

```
services.0.elb
services.1.elb
```
2016-07-08 16:43:42 +01:00
..
module Add proper build constraints for GH-7273 2016-06-23 08:02:32 -04:00
test-fixtures core: Better error for dot indexing on user vars 2016-06-12 10:45:48 -05:00
append.go config: allow atlas block 2015-03-24 13:30:22 -07:00
append_test.go removed extra parentheses 2015-10-08 15:48:04 +03:00
config.go core: Fix detection of empty list/map defaults 2016-06-12 11:19:03 +02:00
config_string.go config: "ResourceMode" concept for resources 2016-05-14 08:26:35 -07:00
config_test.go core: Fix detection of empty list/map defaults 2016-06-12 11:19:03 +02:00
config_tree.go config: make Merge an exported func 2014-07-18 17:05:22 -07:00
import_tree.go Condense switch fallthroughs into expr lists 2015-05-26 21:52:36 -04:00
interpolate.go core: Better error for dot indexing on user vars 2016-06-12 10:45:48 -05:00
interpolate_funcs.go core: Add test and fix for element with empty list 2016-06-23 21:15:33 +01:00
interpolate_funcs_test.go Add test to ensure key/values interp order 2016-06-29 15:06:59 -04:00
interpolate_test.go core: Better error for dot indexing on user vars 2016-06-12 10:45:48 -05:00
interpolate_walk.go core: Fix slice element keys on interpolateWalk 2016-07-08 16:43:42 +01:00
interpolate_walk_test.go core: support native list variables in config 2016-05-10 14:49:14 -04:00
lang.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
loader.go config: new HCL API 2015-11-07 16:53:42 -08:00
loader_hcl.go config: Data source loading 2016-05-14 08:26:35 -07:00
loader_hcl_test.go config: HCL loader 2014-08-11 09:58:53 -07:00
loader_test.go config: Update test to reflect new behaviour 2016-06-20 19:06:03 +03:00
merge.go config: allow atlas block 2015-03-24 13:30:22 -07:00
merge_test.go removed extra parentheses 2015-10-08 15:48:04 +03:00
raw_config.go core: Use native HIL maps instead of flatmaps 2016-05-10 14:49:13 -04:00
raw_config_test.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
resource_mode.go config: "ResourceMode" concept for resources 2016-05-14 08:26:35 -07:00
resource_mode_string.go config: "ResourceMode" concept for resources 2016-05-14 08:26:35 -07:00