mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Fixes #4645 This is something that never worked (even in legacy graphs), but as we push forward towards encouraging multi-provider usage especially with things like the Vault data source, I want to make sure we have this right for 0.8. When you have a config like this: ``` resource "foo_type" "name" {} provider "bar" { attr = "${foo_type.name.value}" } resource "bar_type" "name" {} ``` Then the destruction ordering MUST be: 1. `bar_type` 2. `foo_type` Since configuring the client for `bar_type` requires accessing data from `foo_type`. Prior to this PR, these two would be done in parallel. This properly pushes forward the dependency. There are more cases I want to test but this is a basic case that is fixed.
10 lines
142 B
HCL
10 lines
142 B
HCL
resource "vault_instance" "foo" {}
|
|
|
|
provider "aws" {
|
|
addr = "${vault_instance.foo.id}"
|
|
}
|
|
|
|
resource "aws_instance" "bar" {
|
|
foo = "bar"
|
|
}
|