mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-29 10:21:01 -06:00
f41fe4879e
Previously the plan phase would produce a data diff only if no state was already present. However, this is a faulty approach because a state will already be present in the case where the data resource depends on a managed resource that existed in state during refresh but became computed during plan, due to a "forces new resource" diff. Now we will produce a data diff regardless of the presence of the state when the configuration is computed during the plan phase. This fixes #6824.
7 lines
109 B
HCL
7 lines
109 B
HCL
resource "aws_instance" "foo" {
|
|
}
|
|
|
|
data "aws_data_resource" "foo" {
|
|
foo = "${aws_instance.foo.computed}"
|
|
}
|