diff --git a/0-bootstrap/cb.tf b/0-bootstrap/cb.tf index 19c6e3f34..a0a63ffc3 100644 --- a/0-bootstrap/cb.tf +++ b/0-bootstrap/cb.tf @@ -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" { diff --git a/0-bootstrap/modules/cb-private-pool/network.tf b/0-bootstrap/modules/cb-private-pool/network.tf index 9d382c306..82e120b5f 100644 --- a/0-bootstrap/modules/cb-private-pool/network.tf +++ b/0-bootstrap/modules/cb-private-pool/network.tf @@ -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 @@ -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" {