Skip to content

Commit 62f725f

Browse files
committed
add depends on for cloud build nat instance
1 parent 0c201c7 commit 62f725f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

0-bootstrap/modules/cb-private-pool/network.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ resource "google_compute_address" "cloud_build_nat" {
218218
name = "cloud-build-nat"
219219
network_tier = "PREMIUM"
220220
region = "us-central1"
221+
222+
depends_on = [module.peered_network]
221223
}
222224

223225
resource "google_compute_instance" "vm-proxy" {
@@ -250,7 +252,10 @@ resource "google_compute_instance" "vm-proxy" {
250252
scopes = ["cloud-platform"]
251253
}
252254

253-
depends_on = [resource.google_compute_router_nat.cb-nat]
255+
depends_on = [
256+
resource.google_compute_router_nat.cb-nat,
257+
module.peered_network
258+
]
254259
}
255260

256261
# This route will route packets to the NAT VM

0 commit comments

Comments
 (0)