opentofu/terraform/testdata/apply-module-depends-on/main.tf
James Bardin 14ef51bfcd module depends_on test
verify a chain of depends_on references through modules execute in the
correct order
2020-05-20 14:46:30 -04:00

33 lines
474 B
HCL

module "moda" {
source = "./moda"
depends_on = [test_instance.a, module.modb]
}
resource "test_instance" "a" {
depends_on = [module.modb]
num = 4
foo = test_instance.aa.id
}
resource "test_instance" "aa" {
num = 3
foo = module.modb.out
}
module "modb" {
source = "./modb"
depends_on = [test_instance.b]
}
resource "test_instance" "b" {
num = 1
}
output "moda_data" {
value = module.moda.out
}
output "modb_resource" {
value = module.modb.out
}