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

Add default googleapi route creation to net-vpc #1400

Merged
merged 7 commits into from
May 26, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion blueprints/apigee/bigquery-analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ module "test" {
europe-west1 = "10.0.0.0/28"
}
}
# tftest modules=10 resources=62
# tftest modules=10 resources=64
```
2 changes: 1 addition & 1 deletion blueprints/apigee/hybrid-gke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ module "test" {
project_id = "my-project"
hostname = "test.myorg.org"
}
# tftest modules=18 resources=59
# tftest modules=18 resources=61
```
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ module "test" {
onprem_project_id = "my-onprem-project"
hostname = "test.myorg.org"
}
# tftest modules=14 resources=73
# tftest modules=14 resources=77
```
2 changes: 1 addition & 1 deletion blueprints/cloud-operations/adfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ module "test" {
ad_dns_domain_name = "example.com"
adfs_dns_domain_name = "adfs.example.com"
}
# tftest modules=5 resources=18
# tftest modules=5 resources=20
```
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ module "test" {
project_id = "project-1"
}

# tftest modules=7 resources=21
# tftest modules=7 resources=23
```
2 changes: 1 addition & 1 deletion blueprints/cloud-operations/dns-fine-grained-iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ module "test1" {
project_create = true
project_id = "test"
}
# tftest modules=9 resources=25
# tftest modules=9 resources=27
```
2 changes: 1 addition & 1 deletion blueprints/cloud-operations/dns-shared-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ module "test" {
shared_vpc_link = "https://www.googleapis.com/compute/v1/projects/test-dns/global/networks/default"
teams = ["team1", "team2"]
}
# tftest modules=9 resources=12
# tftest modules=9 resources=16
```
2 changes: 1 addition & 1 deletion blueprints/cloud-operations/packer-image-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ module "test" {
packer_account_users = ["user:john@example.com"]
create_packer_vars = true
}
# tftest modules=7 resources=17 files=pkrvars
# tftest modules=7 resources=19 files=pkrvars
```
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ module "test" {
billing_account = "123456-123456-123456"
project_create = true
}
# tftest modules=11 resources=35
# tftest modules=11 resources=37
```
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ module "test" {
migration_admin_users = ["user:admin@example.com"]
migration_viewer_users = ["user:viewer@example.com"]
}
# tftest modules=5 resources=20
# tftest modules=5 resources=22
```
2 changes: 1 addition & 1 deletion blueprints/data-solutions/bq-ml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ module "test" {
prefix = "prefix"
}

# tftest modules=9 resources=48
# tftest modules=9 resources=50
```
2 changes: 1 addition & 1 deletion blueprints/data-solutions/cloudsql-multiregion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,5 @@ module "test" {
}
prefix = "prefix"
}
# tftest modules=10 resources=50
# tftest modules=10 resources=52
```
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ module "test" {
}
prefix = "prefix"
}
# tftest modules=8 resources=27
# tftest modules=8 resources=29
```
2 changes: 1 addition & 1 deletion blueprints/data-solutions/composer-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ module "test" {
}
prefix = "prefix"
}
# tftest modules=5 resources=26
# tftest modules=5 resources=28
```
4 changes: 2 additions & 2 deletions blueprints/data-solutions/data-platform-foundations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ module "data-platform" {
prefix = "myprefix"
}

# tftest modules=43 resources=279
# tftest modules=43 resources=285
```

## Customizations
Expand Down Expand Up @@ -307,5 +307,5 @@ module "test" {
}
prefix = "prefix"
}
# tftest modules=43 resources=279
# tftest modules=43 resources=285
```
2 changes: 1 addition & 1 deletion blueprints/data-solutions/data-platform-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ module "data-platform" {
prefix = "myprefix"
}

# tftest modules=21 resources=110
# tftest modules=21 resources=112
```

## Customizations
Expand Down
2 changes: 1 addition & 1 deletion blueprints/data-solutions/data-playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@ module "test" {
parent = "folders/467898377"
}
}
# tftest modules=8 resources=41
# tftest modules=8 resources=43
```
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,5 @@ module "test" {
project_id = "project-1"
prefix = "prefix"
}
# tftest modules=12 resources=47
# tftest modules=12 resources=49
```
2 changes: 1 addition & 1 deletion blueprints/data-solutions/sqlserver-alwayson/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ module "test" {
ad_domain_fqdn = "ad.example.com"
ad_domain_netbios = "ad"
}
# tftest modules=12 resources=38
# tftest modules=12 resources=40
```
4 changes: 2 additions & 2 deletions blueprints/data-solutions/vertex-mlops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module "test" {
project_id = "test-dev"
}
}
# tftest modules=11 resources=60
# tftest modules=11 resources=62
```
<!-- BEGIN TFDOC -->

Expand Down Expand Up @@ -127,5 +127,5 @@ module "test" {
project_id = "test-dev"
}
}
# tftest modules=13 resources=65
# tftest modules=13 resources=67
```
4 changes: 2 additions & 2 deletions blueprints/gke/autopilot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ module "test" {
}
project_id = "my-project"
}
# tftest modules=11 resources=34
```
# tftest modules=11 resources=36
```
2 changes: 1 addition & 1 deletion blueprints/gke/binauthz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ module "test" {
}
project_id = "my-project"
}
# tftest modules=14 resources=47
# tftest modules=14 resources=49
```
2 changes: 1 addition & 1 deletion blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ module "test" {
mgmt_subnet_cidr_block = "10.0.0.0/24"
istio_version = "1.14.1-asm.3"
}
# tftest modules=13 resources=57
# tftest modules=13 resources=59
```
2 changes: 1 addition & 1 deletion blueprints/networking/decentralized-firewall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ module "test" {
root_node = "organizations/0123456789"
}

# tftest modules=9 resources=50
# tftest modules=9 resources=54
```
2 changes: 1 addition & 1 deletion blueprints/networking/filtering-proxy-psc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ module "test" {
}
project_id = "test-project"
}
# tftest modules=13 resources=37
# tftest modules=13 resources=41
```
4 changes: 2 additions & 2 deletions blueprints/networking/filtering-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module "test1" {
prefix = "fabric"
root_node = "folders/123456789"
}
# tftest modules=14 resources=36
# tftest modules=14 resources=38
```

```hcl
Expand All @@ -58,5 +58,5 @@ module "test2" {
prefix = "fabric"
root_node = "folders/123456789"
}
# tftest modules=12 resources=30
# tftest modules=12 resources=32
```
2 changes: 1 addition & 1 deletion blueprints/networking/glb-and-armor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,5 @@ module "test" {
project_id = "project-1"
enforce_security_policy = true
}
# tftest modules=12 resources=26
# tftest modules=12 resources=28
```
2 changes: 1 addition & 1 deletion blueprints/networking/glb-hybrid-neg-internal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ module "test" {
}
}

# tftest modules=21 resources=64
# tftest modules=21 resources=70
```
2 changes: 1 addition & 1 deletion blueprints/networking/hub-and-spoke-peering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ module "test" {
project_id = "project-1"
}

# tftest modules=22 resources=61
# tftest modules=22 resources=67
```
2 changes: 1 addition & 1 deletion blueprints/networking/hub-and-spoke-vpn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ module "test" {
project_id = "project-1"
}

# tftest modules=20 resources=73
# tftest modules=20 resources=79
```
2 changes: 1 addition & 1 deletion blueprints/networking/ilb-next-hop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ module "test" {
project_create = true
project_id = "project-1"
}
# tftest modules=18 resources=42
# tftest modules=18 resources=46
```
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ module "test" {
}
project_id = "test-project"
}
# tftest modules=11 resources=40
# tftest modules=11 resources=44
```
2 changes: 1 addition & 1 deletion blueprints/networking/shared-vpc-gke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ module "test" {
prefix = "test"
root_node = "organizations/0123456789"
}
# tftest modules=11 resources=43
# tftest modules=11 resources=45
```
6 changes: 3 additions & 3 deletions blueprints/serverless/cloud-run-corporate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ module "test" {
prj_onprem_id = "onprem-project-id"
}

# tftest modules=15 resources=46
# tftest modules=15 resources=50
```

```hcl
Expand All @@ -262,7 +262,7 @@ module "test" {
tf_identity = "user@example.org"
}

# tftest modules=15 resources=32
# tftest modules=15 resources=36
```

```hcl
Expand All @@ -281,5 +281,5 @@ module "test" {
custom_domain = "cloud-run-corporate.example.org"
}

# tftest modules=14 resources=43
# tftest modules=14 resources=45
```
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ module "dev-spoke-vpc-serverless" {
ip_cidr_range = var.serverless_connector_config.dev-primary.ip_cidr_range
region = var.regions.primary
}]
# these should be create from the main VPC
create_googleapis_routes = {
private = false
private-6 = false
restricted = false
restricted-6 = false
}
}

module "prod-spoke-vpc-serverless" {
Expand All @@ -51,6 +58,13 @@ module "prod-spoke-vpc-serverless" {
ip_cidr_range = var.serverless_connector_config.prod-primary.ip_cidr_range
region = var.regions.primary
}]
# these should be create from the main VPC
create_googleapis_routes = {
private = false
private-6 = false
restricted = false
restricted-6 = false
}
}

resource "google_vpc_access_connector" "dev-primary" {
Expand Down
16 changes: 4 additions & 12 deletions fast/stages/2-networking-a-peering/landing.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,17 +51,9 @@ module "landing-vpc" {
inbound = true
}
# set explicit routes for googleapis in case the default route is deleted
routes = {
private-googleapis = {
dest_range = "199.36.153.8/30"
next_hop_type = "gateway"
next_hop = "default-internet-gateway"
}
restricted-googleapis = {
dest_range = "199.36.153.4/30"
next_hop_type = "gateway"
next_hop = "default-internet-gateway"
}
create_googleapis_routes = {
private = true
restricted = true
}
data_folder = "${var.factories_config.data_dir}/subnets/landing"
}
Expand Down
16 changes: 4 additions & 12 deletions fast/stages/2-networking-a-peering/spoke-dev.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,17 +53,9 @@ module "dev-spoke-vpc" {
data_folder = "${var.factories_config.data_dir}/subnets/dev"
psa_config = try(var.psa_ranges.dev, null)
# set explicit routes for googleapis in case the default route is deleted
routes = {
private-googleapis = {
dest_range = "199.36.153.8/30"
next_hop_type = "gateway"
next_hop = "default-internet-gateway"
}
restricted-googleapis = {
dest_range = "199.36.153.4/30"
next_hop_type = "gateway"
next_hop = "default-internet-gateway"
}
create_googleapis_routes = {
private = true
restricted = true
}
}

Expand Down
16 changes: 4 additions & 12 deletions fast/stages/2-networking-a-peering/spoke-prod.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,17 +52,9 @@ module "prod-spoke-vpc" {
data_folder = "${var.factories_config.data_dir}/subnets/prod"
psa_config = try(var.psa_ranges.prod, null)
# set explicit routes for googleapis in case the default route is deleted
routes = {
private-googleapis = {
dest_range = "199.36.153.8/30"
next_hop_type = "gateway"
next_hop = "default-internet-gateway"
}
restricted-googleapis = {
dest_range = "199.36.153.4/30"
next_hop_type = "gateway"
next_hop = "default-internet-gateway"
}
create_googleapis_routes = {
private = true
restricted = true
}
}

Expand Down