Skip to content

Commit

Permalink
Merge pull request #81 from agno01/fix-data-subnets-fetch-depends-on
Browse files Browse the repository at this point in the history
Add depends_on to created_subnets data fetch
  • Loading branch information
morgante authored Oct 11, 2019
2 parents 9e04cf2 + f933614 commit bc07616
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ 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
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]
}

/******************************************
Expand Down

0 comments on commit bc07616

Please sign in to comment.