Skip to content

Commit

Permalink
add worker_pool_conn depends_on and remove module seed_boostratp depe…
Browse files Browse the repository at this point in the history
…nds_on
  • Loading branch information
mariammartins committed Sep 30, 2024
1 parent b8885e0 commit ad47f69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 0-bootstrap/cb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ module "tf_source" {
}

# Remove after github.com/terraform-google-modules/terraform-google-bootstrap/issues/160
depends_on = [module.seed_bootstrap, time_sleep.wait_organization_policies]
depends_on = [time_sleep.wait_organization_policies]
}

module "tf_private_pool" {
Expand Down
9 changes: 8 additions & 1 deletion 0-bootstrap/modules/cb-private-pool/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ resource "google_service_networking_connection" "worker_pool_conn" {
reserved_peering_ranges = [google_compute_global_address.worker_pool_range[0].name]
}

resource "time_sleep" "wait_worker_pool_conn" {
create_duration = "30s"
depends_on = [
google_service_networking_connection.worker_pool_conn
]
}

resource "google_compute_network_peering_routes_config" "peering_routes" {
count = var.private_worker_pool.enable_network_peering ? 1 : 0

Expand All @@ -87,7 +94,7 @@ resource "google_compute_network_peering_routes_config" "peering_routes" {
import_custom_routes = true
export_custom_routes = true

depends_on = [google_service_networking_connection.worker_pool_conn]
depends_on = [time_sleep.wait_worker_pool_conn]
}

module "firewall_rules" {
Expand Down

0 comments on commit ad47f69

Please sign in to comment.