diff --git a/main.tf b/main.tf index f0b97325..6fd82bea 100644 --- a/main.tf +++ b/main.tf @@ -59,11 +59,10 @@ resource "google_compute_subnetwork" "subnetwork" { } data "google_compute_subnetwork" "created_subnets" { - count = length(var.subnets) - name = element(google_compute_subnetwork.subnetwork.*.name, count.index) - region = element(google_compute_subnetwork.subnetwork.*.region, count.index) - project = var.project_id - depends_on = [google_compute_subnetwork.subnetwork] + count = length(var.subnets) + name = element(google_compute_subnetwork.subnetwork.*.name, count.index) + region = element(google_compute_subnetwork.subnetwork.*.region, count.index) + project = var.project_id } /******************************************