Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage new shared VPC project config defaults across the repo #861

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ module "project" {
storage = [local.kms.europe.gcs]
}
shared_vpc_service_config = {
attach = true
host_project = "project-host"
service_identity_iam = {}
attach = true
host_project = "project-host"
}
}
```
Expand Down Expand Up @@ -258,9 +257,8 @@ module "project" {
source = "./modules/project"
name = "prj-1"
shared_vpc_service_config = {
attach = true
host_project = "project-host"
service_identity_iam = {}
attach = true
host_project = "project-host"
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ module "project-host" {
services = var.project_services

shared_vpc_host_config = {
enabled = true
service_projects = [] # defined later
enabled = true
}
}

Expand Down
24 changes: 9 additions & 15 deletions blueprints/cloud-operations/network-dashboard/tests/test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ module "project-hub" {
services = var.project_vm_services

shared_vpc_host_config = {
enabled = true
service_projects = [] # defined later
enabled = true
}
}

Expand All @@ -58,9 +57,8 @@ module "project-svc-hub" {
services = var.project_vm_services

shared_vpc_service_config = {
attach = true
host_project = module.project-hub.project_id
service_identity_iam = {}
attach = true
host_project = module.project-hub.project_id
}
}

Expand All @@ -73,8 +71,7 @@ module "project-prod" {
services = var.project_vm_services

shared_vpc_host_config = {
enabled = true
service_projects = [] # defined later
enabled = true
}
}

Expand All @@ -101,9 +98,8 @@ module "project-svc-prod" {
services = var.project_vm_services

shared_vpc_service_config = {
attach = true
host_project = module.project-prod.project_id
service_identity_iam = {}
attach = true
host_project = module.project-prod.project_id
}
}

Expand All @@ -116,8 +112,7 @@ module "project-dev" {
services = var.project_vm_services

shared_vpc_host_config = {
enabled = true
service_projects = [] # defined later
enabled = true
}
}

Expand All @@ -144,9 +139,8 @@ module "project-svc-dev" {
services = var.project_vm_services

shared_vpc_service_config = {
attach = true
host_project = module.project-dev.project_id
service_identity_iam = {}
attach = true
host_project = module.project-dev.project_id
}
}

Expand Down
5 changes: 2 additions & 3 deletions blueprints/data-solutions/cloudsql-multiregion/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ module "project" {
]

shared_vpc_service_config = local.shared_vpc_project == null ? null : {
attach = true
host_project = local.shared_vpc_project
service_identity_iam = {}
attach = true
host_project = local.shared_vpc_project
}

service_encryption_key_ids = {
Expand Down
5 changes: 2 additions & 3 deletions blueprints/data-solutions/composer-2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ module "project" {
]

shared_vpc_service_config = local.shared_vpc_project == null ? null : {
attach = true
host_project = local.shared_vpc_project
service_identity_iam = {}
attach = true
host_project = local.shared_vpc_project
}

service_encryption_key_ids = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ module "load-project" {
storage = [try(local.service_encryption_keys.storage, null)]
}
shared_vpc_service_config = local.shared_vpc_project == null ? null : {
attach = true
host_project = local.shared_vpc_project
service_identity_iam = {}
attach = true
host_project = local.shared_vpc_project
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ module "orch-project" {
storage = [try(local.service_encryption_keys.storage, null)]
}
shared_vpc_service_config = local.shared_vpc_project == null ? null : {
attach = true
host_project = local.shared_vpc_project
service_identity_iam = {}
attach = true
host_project = local.shared_vpc_project
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ module "transf-project" {
storage = [try(local.service_encryption_keys.storage, null)]
}
shared_vpc_service_config = local.shared_vpc_project == null ? null : {
attach = true
host_project = local.shared_vpc_project
service_identity_iam = {}
attach = true
host_project = local.shared_vpc_project
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ module "project" {
iam = var.project_create != null ? local.iam : {}
iam_additive = var.project_create == null ? local.iam : {}
shared_vpc_service_config = local.shared_vpc_project == null ? null : {
attach = true
host_project = local.shared_vpc_project
service_identity_iam = {}
attach = true
host_project = local.shared_vpc_project
}
}

Expand Down
5 changes: 2 additions & 3 deletions blueprints/data-solutions/sqlserver-alwayson/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ module "project" {
iam = {}
iam_additive = {}
shared_vpc_service_config = var.shared_vpc_project_id == null ? null : {
attach = true
host_project = var.shared_vpc_project_id
service_identity_iam = {}
attach = true
host_project = var.shared_vpc_project_id
}
}
3 changes: 1 addition & 2 deletions blueprints/gke/multi-cluster-mesh-gke-fleet-api/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ module "host_project" {
parent = var.parent
name = var.host_project_id
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
services = [
"container.googleapis.com"
Expand Down
6 changes: 2 additions & 4 deletions blueprints/networking/decentralized-firewall/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ module "project-host-prod" {
services = var.project_services

shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
}

Expand All @@ -39,8 +38,7 @@ module "project-host-dev" {
services = var.project_services

shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
}

Expand Down
3 changes: 1 addition & 2 deletions blueprints/networking/filtering-proxy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ module "project-host" {
"logging.googleapis.com"
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
}

Expand Down
3 changes: 1 addition & 2 deletions blueprints/networking/shared-vpc-gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ module "project-host" {
name = "net"
services = concat(var.project_services, ["dns.googleapis.com"])
shared_vpc_host_config = {
enabled = true
service_projects = [] # defined later
enabled = true
}
iam = {
"roles/owner" = var.owners_host
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-nva/landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ module "landing-project" {
"stackdriver.googleapis.com"
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
iam = {
"roles/dns.admin" = compact([
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-nva/spoke-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module "dev-spoke-project" {
"stackdriver.googleapis.com",
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
metric_scopes = [module.landing-project.project_id]
iam = {
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-nva/spoke-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module "prod-spoke-project" {
"stackdriver.googleapis.com",
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
metric_scopes = [module.landing-project.project_id]
iam = {
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-peering/landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ module "landing-project" {
"stackdriver.googleapis.com"
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
iam = {
"roles/dns.admin" = compact([
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-peering/spoke-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ module "dev-spoke-project" {
"stackdriver.googleapis.com",
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
metric_scopes = [module.landing-project.project_id]
iam = {
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-peering/spoke-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ module "prod-spoke-project" {
"stackdriver.googleapis.com",
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
metric_scopes = [module.landing-project.project_id]
iam = {
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-vpn/landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ module "landing-project" {
"stackdriver.googleapis.com"
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
iam = {
"roles/dns.admin" = compact([
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-vpn/spoke-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ module "dev-spoke-project" {
"stackdriver.googleapis.com",
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
metric_scopes = [module.landing-project.project_id]
iam = {
Expand Down
3 changes: 1 addition & 2 deletions fast/stages/02-networking-vpn/spoke-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ module "prod-spoke-project" {
"stackdriver.googleapis.com",
]
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
metric_scopes = [module.landing-project.project_id]
iam = {
Expand Down
3 changes: 1 addition & 2 deletions modules/project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ module "project" {
source = "./fabric/modules/project"
name = "project-example"
shared_vpc_host_config = {
enabled = true
service_projects = []
enabled = true
}
}
# tftest modules=1 resources=2
Expand Down