mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-07 22:53:08 -06:00
3f72837f4b
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.
20 lines
263 B
HCL
20 lines
263 B
HCL
variable "ref" {
|
|
default = "foo"
|
|
}
|
|
|
|
resource "foo" "bar" {
|
|
depends_on = ["dep"]
|
|
provider = "foo-west"
|
|
count = 2
|
|
attr = "value"
|
|
ref = "${var.ref}"
|
|
|
|
provisioner "shell" {
|
|
inline = "echo"
|
|
}
|
|
|
|
lifecycle {
|
|
ignore_changes = ["config"]
|
|
}
|
|
}
|