fix shared vpc project services

This commit is contained in:
Ludovico Magnocavallo
2019-11-03 09:26:28 +01:00
parent e77acf621a
commit 738d613126
2 changed files with 5 additions and 13 deletions

View File

@@ -47,10 +47,7 @@ module "project-service-gce" {
owners = var.owners_gce owners = var.owners_gce
oslogin_admins = var.oslogin_admins_gce oslogin_admins = var.oslogin_admins_gce
oslogin_users = var.oslogin_users_gce oslogin_users = var.oslogin_users_gce
activate_apis = concat( activate_apis = var.project_services
var.project_services,
["container.googleapis.com"]
)
} }
module "project-service-gke" { module "project-service-gke" {
@@ -62,10 +59,7 @@ module "project-service-gke" {
name = "gke" name = "gke"
billing_account = var.billing_account_id billing_account = var.billing_account_id
owners = var.owners_gke owners = var.owners_gke
activate_apis = concat( activate_apis = var.project_services
var.project_services,
["resourceviews.googleapis.com"]
)
} }
################################################################################ ################################################################################
@@ -117,7 +111,8 @@ module "net-svpc-access" {
host_project_id = module.project-svpc-host.project_id host_project_id = module.project-svpc-host.project_id
service_project_num = 2 service_project_num = 2
service_project_ids = [ service_project_ids = [
module.project-service-gce.project_id, module.project-service-gke.project_id module.project-service-gce.project_id,
module.project-service-gke.project_id
] ]
host_subnets = ["gce", "gke"] host_subnets = ["gce", "gke"]
host_subnet_regions = compact([ host_subnet_regions = compact([

View File

@@ -107,10 +107,7 @@ variable "subnet_secondary_ranges" {
variable "project_services" { variable "project_services" {
description = "Service APIs enabled by default in new projects." description = "Service APIs enabled by default in new projects."
default = [ default = [
"bigquery.googleapis.com", "resourceviews.googleapis.com",
"compute.googleapis.com",
"iam.googleapis.com",
"stackdriver.googleapis.com", "stackdriver.googleapis.com",
"storage-api.googleapis.com",
] ]
} }