diff --git a/main.tf b/main.tf index f3d443d8..cff8d323 100644 --- a/main.tf +++ b/main.tf @@ -81,12 +81,15 @@ module "shared_vpc_access" { enable_shared_vpc_service_project = var.svpc_host_project_id != "" ? true : false host_project_id = var.svpc_host_project_id service_project_id = module.project-factory.project_id - active_apis = module.project-factory.enabled_apis + active_apis = var.activate_apis shared_vpc_subnets = var.shared_vpc_subnets service_project_number = module.project-factory.project_number lookup_project_numbers = false grant_services_security_admin_role = var.grant_services_security_admin_role grant_network_role = var.grant_network_role + # Workaround for import complaining about count cannot determine resource instances + # until apply. https://github.com/hashicorp/terraform/issues/24690 + depends_on = [module.project-factory.enabled_apis] } /****************************************** diff --git a/modules/svpc_service_project/main.tf b/modules/svpc_service_project/main.tf index c00ad9d9..be66ddc8 100755 --- a/modules/svpc_service_project/main.tf +++ b/modules/svpc_service_project/main.tf @@ -69,12 +69,15 @@ module "shared_vpc_access" { host_project_id = var.shared_vpc enable_shared_vpc_service_project = true service_project_id = module.project-factory.project_id - active_apis = module.project-factory.enabled_apis + active_apis = var.activate_apis shared_vpc_subnets = var.shared_vpc_subnets service_project_number = module.project-factory.project_number lookup_project_numbers = false grant_services_security_admin_role = var.grant_services_security_admin_role grant_network_role = var.grant_network_role + # Workaround for import complaining about count cannot determine resource instances + # until apply. https://github.com/hashicorp/terraform/issues/24690 + depends_on = [module.project-factory.enabled_apis] } /******************************************