mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-27 01:11:10 -06:00
aacfaa4fd7
The old logic for `depends_on` was to short-circuit evaluation of the data source, but that prevented a plan and state from being recorded. Use the (currently unused) ForcePlanRead to ensure that the plan is recorded when the config contains `depends_on`. This does not fix the fact that depends on does not work with data sources, and will still produce a perpetual diff. This is only to fix evaluation errors when an indexed data source is evaluated during refresh.
15 lines
204 B
HCL
15 lines
204 B
HCL
resource "test_resource" "a" {
|
|
}
|
|
|
|
data "test_data" "d" {
|
|
count = 1
|
|
depends_on = [
|
|
test_resource.a
|
|
]
|
|
}
|
|
|
|
resource "test_resource" "b" {
|
|
count = 1
|
|
foo = data.test_data.d[count.index].compute
|
|
}
|