mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-05 21:53:04 -06:00
c6e03cba96
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 ``` |
||
---|---|---|
.. | ||
module | ||
test-fixtures | ||
append_test.go | ||
append.go | ||
config_string.go | ||
config_test.go | ||
config_tree.go | ||
config.go | ||
import_tree.go | ||
interpolate_funcs_test.go | ||
interpolate_funcs.go | ||
interpolate_test.go | ||
interpolate_walk_test.go | ||
interpolate_walk.go | ||
interpolate.go | ||
lang.go | ||
loader_hcl_test.go | ||
loader_hcl.go | ||
loader_test.go | ||
loader.go | ||
merge_test.go | ||
merge.go | ||
raw_config_test.go | ||
raw_config.go | ||
resource_mode_string.go | ||
resource_mode.go |