github.com/hugorut/terraform@v1.1.3/src/terraform/testdata/apply-module-depends-on/main.tf (about) 1 module "moda" { 2 source = "./moda" 3 depends_on = [test_instance.a, module.modb] 4 } 5 6 resource "test_instance" "a" { 7 depends_on = [module.modb] 8 num = 4 9 foo = test_instance.aa.id 10 } 11 12 resource "test_instance" "aa" { 13 num = 3 14 foo = module.modb.out 15 } 16 17 module "modb" { 18 source = "./modb" 19 depends_on = [test_instance.b] 20 } 21 22 resource "test_instance" "b" { 23 num = 1 24 } 25 26 output "moda_data" { 27 value = module.moda.out 28 } 29 30 output "modb_resource" { 31 value = module.modb.out 32 }