opentofu/config
Paul Hinze 3f72837f4b core: Make copies when creating destroy nodes
Fixes an interpolation race that was occurring when a tainted destroy
node and a primary destroy node both tried to interpolate a computed
count in their config. Since they were sharing a pointer to the _same_
config, depending on how the race played out one of them could catch the
config uninterpolated and would then throw a syntax error.

The `Copy()` tree implemented for this fix can probably be used
elsewhere - basically we should copy the config whenever we drop nodes
into the graph - but for now I'm just applying it to the place that
fixes this bug.

Fixes #4982 - Includes a test covering that race condition.
2016-02-09 09:25:16 -06:00
..
module config: validation error when output is missing value field 2016-01-20 14:00:36 -06:00
test-fixtures core: Make copies when creating destroy nodes 2016-02-09 09:25:16 -06:00
append_test.go removed extra parentheses 2015-10-08 15:48:04 +03:00
append.go config: allow atlas block 2015-03-24 13:30:22 -07:00
config_string.go core: Support explicit variable type declaration 2016-01-24 11:40:02 -06:00
config_test.go core: Make copies when creating destroy nodes 2016-02-09 09:25:16 -06:00
config_tree.go config: make Merge an exported func 2014-07-18 17:05:22 -07:00
config.go core: Make copies when creating destroy nodes 2016-02-09 09:25:16 -06:00
import_tree.go Condense switch fallthroughs into expr lists 2015-05-26 21:52:36 -04:00
interpolate_funcs_test.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
interpolate_funcs.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
interpolate_test.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
interpolate_walk_test.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
interpolate_walk.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
interpolate.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
lang.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
loader_hcl_test.go config: HCL loader 2014-08-11 09:58:53 -07:00
loader_hcl.go core: Support explicit variable type declaration 2016-01-24 11:40:02 -06:00
loader_test.go core: Support explicit variable type declaration 2016-01-24 11:40:02 -06:00
loader.go config: new HCL API 2015-11-07 16:53:42 -08:00
merge_test.go removed extra parentheses 2015-10-08 15:48:04 +03:00
merge.go config: allow atlas block 2015-03-24 13:30:22 -07:00
raw_config_test.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
raw_config.go core: Make copies when creating destroy nodes 2016-02-09 09:25:16 -06:00
string_list_test.go Add tests for empty string lists 2015-10-08 17:32:54 +02:00
string_list.go go fmt the "compact" function changes. 2015-10-10 15:17:25 -07:00