diff --git a/blueprints/apigee/hybrid-gke/README.md b/blueprints/apigee/hybrid-gke/README.md index 05614fac..5d79f1f8 100644 --- a/blueprints/apigee/hybrid-gke/README.md +++ b/blueprints/apigee/hybrid-gke/README.md @@ -80,5 +80,5 @@ module "test" { project_id = "my-project" hostname = "test.myorg.org" } -# tftest modules=18 resources=59 +# tftest modules=18 resources=61 ``` diff --git a/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md b/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md index 1919c657..b568bd8e 100644 --- a/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md +++ b/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md @@ -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 ``` diff --git a/blueprints/cloud-operations/adfs/README.md b/blueprints/cloud-operations/adfs/README.md index b1efb7b7..914382ca 100644 --- a/blueprints/cloud-operations/adfs/README.md +++ b/blueprints/cloud-operations/adfs/README.md @@ -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 ``` diff --git a/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md b/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md index 1025a6be..5e192194 100644 --- a/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md +++ b/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md @@ -82,5 +82,5 @@ module "test" { project_id = "project-1" } -# tftest modules=7 resources=21 +# tftest modules=7 resources=23 ``` diff --git a/blueprints/cloud-operations/dns-fine-grained-iam/README.md b/blueprints/cloud-operations/dns-fine-grained-iam/README.md index 8fe402f2..6379495d 100644 --- a/blueprints/cloud-operations/dns-fine-grained-iam/README.md +++ b/blueprints/cloud-operations/dns-fine-grained-iam/README.md @@ -128,5 +128,5 @@ module "test1" { project_create = true project_id = "test" } -# tftest modules=9 resources=25 +# tftest modules=9 resources=27 ``` diff --git a/blueprints/cloud-operations/dns-shared-vpc/README.md b/blueprints/cloud-operations/dns-shared-vpc/README.md index 6d6e627b..ed64d1de 100644 --- a/blueprints/cloud-operations/dns-shared-vpc/README.md +++ b/blueprints/cloud-operations/dns-shared-vpc/README.md @@ -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 ``` diff --git a/blueprints/cloud-operations/packer-image-builder/README.md b/blueprints/cloud-operations/packer-image-builder/README.md index a72cb738..8d542c33 100644 --- a/blueprints/cloud-operations/packer-image-builder/README.md +++ b/blueprints/cloud-operations/packer-image-builder/README.md @@ -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 ``` diff --git a/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md b/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md index 29721ac1..067ebb10 100644 --- a/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md +++ b/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md @@ -128,5 +128,5 @@ module "test" { billing_account = "123456-123456-123456" project_create = true } -# tftest modules=11 resources=35 +# tftest modules=11 resources=37 ``` diff --git a/blueprints/cloud-operations/vm-migration/single-project/README.md b/blueprints/cloud-operations/vm-migration/single-project/README.md index 0817a639..bc51953d 100644 --- a/blueprints/cloud-operations/vm-migration/single-project/README.md +++ b/blueprints/cloud-operations/vm-migration/single-project/README.md @@ -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 ``` diff --git a/blueprints/data-solutions/bq-ml/README.md b/blueprints/data-solutions/bq-ml/README.md index 385ec529..4211b6f0 100644 --- a/blueprints/data-solutions/bq-ml/README.md +++ b/blueprints/data-solutions/bq-ml/README.md @@ -98,5 +98,5 @@ module "test" { prefix = "prefix" } -# tftest modules=9 resources=48 +# tftest modules=9 resources=50 ``` diff --git a/blueprints/data-solutions/cloudsql-multiregion/README.md b/blueprints/data-solutions/cloudsql-multiregion/README.md index 13b5be8a..1216c0aa 100644 --- a/blueprints/data-solutions/cloudsql-multiregion/README.md +++ b/blueprints/data-solutions/cloudsql-multiregion/README.md @@ -180,5 +180,5 @@ module "test" { } prefix = "prefix" } -# tftest modules=10 resources=50 +# tftest modules=10 resources=52 ``` diff --git a/blueprints/data-solutions/cmek-via-centralized-kms/README.md b/blueprints/data-solutions/cmek-via-centralized-kms/README.md index ab80d5ff..74d98e3a 100644 --- a/blueprints/data-solutions/cmek-via-centralized-kms/README.md +++ b/blueprints/data-solutions/cmek-via-centralized-kms/README.md @@ -66,5 +66,5 @@ module "test" { } prefix = "prefix" } -# tftest modules=8 resources=27 +# tftest modules=8 resources=29 ``` diff --git a/blueprints/data-solutions/composer-2/README.md b/blueprints/data-solutions/composer-2/README.md index ab4f65d9..3f665dbd 100644 --- a/blueprints/data-solutions/composer-2/README.md +++ b/blueprints/data-solutions/composer-2/README.md @@ -125,5 +125,5 @@ module "test" { } prefix = "prefix" } -# tftest modules=5 resources=26 +# tftest modules=5 resources=28 ``` diff --git a/blueprints/data-solutions/data-platform-foundations/README.md b/blueprints/data-solutions/data-platform-foundations/README.md index 8bb9c2ca..15c22ded 100644 --- a/blueprints/data-solutions/data-platform-foundations/README.md +++ b/blueprints/data-solutions/data-platform-foundations/README.md @@ -226,7 +226,7 @@ module "data-platform" { prefix = "myprefix" } -# tftest modules=43 resources=279 +# tftest modules=43 resources=285 ``` ## Customizations @@ -307,5 +307,5 @@ module "test" { } prefix = "prefix" } -# tftest modules=43 resources=279 +# tftest modules=43 resources=285 ``` diff --git a/blueprints/data-solutions/data-platform-minimal/README.md b/blueprints/data-solutions/data-platform-minimal/README.md index f4689113..e5edf514 100644 --- a/blueprints/data-solutions/data-platform-minimal/README.md +++ b/blueprints/data-solutions/data-platform-minimal/README.md @@ -203,7 +203,7 @@ module "data-platform" { prefix = "myprefix" } -# tftest modules=21 resources=110 +# tftest modules=21 resources=112 ``` ## Customizations diff --git a/blueprints/data-solutions/data-playground/README.md b/blueprints/data-solutions/data-playground/README.md index 5f534aa2..c3693ee2 100644 --- a/blueprints/data-solutions/data-playground/README.md +++ b/blueprints/data-solutions/data-playground/README.md @@ -86,5 +86,5 @@ module "test" { parent = "folders/467898377" } } -# tftest modules=8 resources=41 +# tftest modules=8 resources=43 ``` diff --git a/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md b/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md index 041c946b..21c342e0 100644 --- a/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md +++ b/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md @@ -228,5 +228,5 @@ module "test" { project_id = "project-1" prefix = "prefix" } -# tftest modules=12 resources=47 +# tftest modules=12 resources=49 ``` diff --git a/blueprints/data-solutions/sqlserver-alwayson/README.md b/blueprints/data-solutions/sqlserver-alwayson/README.md index 695c8f0b..85ab8385 100644 --- a/blueprints/data-solutions/sqlserver-alwayson/README.md +++ b/blueprints/data-solutions/sqlserver-alwayson/README.md @@ -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 ``` diff --git a/blueprints/data-solutions/vertex-mlops/README.md b/blueprints/data-solutions/vertex-mlops/README.md index ef6b98f6..974ec335 100644 --- a/blueprints/data-solutions/vertex-mlops/README.md +++ b/blueprints/data-solutions/vertex-mlops/README.md @@ -72,7 +72,7 @@ module "test" { project_id = "test-dev" } } -# tftest modules=11 resources=60 +# tftest modules=11 resources=62 ``` @@ -127,5 +127,5 @@ module "test" { project_id = "test-dev" } } -# tftest modules=13 resources=65 +# tftest modules=13 resources=67 ``` diff --git a/blueprints/gke/autopilot/README.md b/blueprints/gke/autopilot/README.md index aa67956f..b31b0879 100644 --- a/blueprints/gke/autopilot/README.md +++ b/blueprints/gke/autopilot/README.md @@ -91,5 +91,5 @@ module "test" { } project_id = "my-project" } -# tftest modules=11 resources=34 -``` \ No newline at end of file +# tftest modules=11 resources=36 +``` diff --git a/blueprints/gke/binauthz/README.md b/blueprints/gke/binauthz/README.md index 09eac687..740982e6 100644 --- a/blueprints/gke/binauthz/README.md +++ b/blueprints/gke/binauthz/README.md @@ -138,5 +138,5 @@ module "test" { } project_id = "my-project" } -# tftest modules=14 resources=47 +# tftest modules=14 resources=49 ``` diff --git a/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md b/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md index 8237f92c..4efbaf4f 100644 --- a/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md +++ b/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md @@ -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 ``` diff --git a/blueprints/networking/decentralized-firewall/README.md b/blueprints/networking/decentralized-firewall/README.md index 334fd0f2..2fd89640 100644 --- a/blueprints/networking/decentralized-firewall/README.md +++ b/blueprints/networking/decentralized-firewall/README.md @@ -51,5 +51,5 @@ module "test" { root_node = "organizations/0123456789" } -# tftest modules=9 resources=50 +# tftest modules=9 resources=54 ``` diff --git a/blueprints/networking/filtering-proxy-psc/README.md b/blueprints/networking/filtering-proxy-psc/README.md index 66a22caa..dd9f0585 100644 --- a/blueprints/networking/filtering-proxy-psc/README.md +++ b/blueprints/networking/filtering-proxy-psc/README.md @@ -40,5 +40,5 @@ module "test" { } project_id = "test-project" } -# tftest modules=13 resources=37 +# tftest modules=13 resources=41 ``` diff --git a/blueprints/networking/filtering-proxy/README.md b/blueprints/networking/filtering-proxy/README.md index 6aab12b2..70dcf6df 100644 --- a/blueprints/networking/filtering-proxy/README.md +++ b/blueprints/networking/filtering-proxy/README.md @@ -47,7 +47,7 @@ module "test1" { prefix = "fabric" root_node = "folders/123456789" } -# tftest modules=14 resources=36 +# tftest modules=14 resources=38 ``` ```hcl @@ -58,5 +58,5 @@ module "test2" { prefix = "fabric" root_node = "folders/123456789" } -# tftest modules=12 resources=30 +# tftest modules=12 resources=32 ``` diff --git a/blueprints/networking/glb-and-armor/README.md b/blueprints/networking/glb-and-armor/README.md index 25b9e96f..3e466131 100644 --- a/blueprints/networking/glb-and-armor/README.md +++ b/blueprints/networking/glb-and-armor/README.md @@ -151,5 +151,5 @@ module "test" { project_id = "project-1" enforce_security_policy = true } -# tftest modules=12 resources=26 +# tftest modules=12 resources=28 ``` diff --git a/blueprints/networking/glb-hybrid-neg-internal/README.md b/blueprints/networking/glb-hybrid-neg-internal/README.md index b6bd3d78..253dc4c4 100644 --- a/blueprints/networking/glb-hybrid-neg-internal/README.md +++ b/blueprints/networking/glb-hybrid-neg-internal/README.md @@ -96,5 +96,5 @@ module "test" { } } -# tftest modules=21 resources=64 +# tftest modules=21 resources=70 ``` diff --git a/blueprints/networking/hub-and-spoke-peering/README.md b/blueprints/networking/hub-and-spoke-peering/README.md index b9582832..09b5dc5d 100644 --- a/blueprints/networking/hub-and-spoke-peering/README.md +++ b/blueprints/networking/hub-and-spoke-peering/README.md @@ -115,5 +115,5 @@ module "test" { project_id = "project-1" } -# tftest modules=22 resources=61 +# tftest modules=22 resources=67 ``` diff --git a/blueprints/networking/hub-and-spoke-vpn/README.md b/blueprints/networking/hub-and-spoke-vpn/README.md index 14beaa13..d0f2d1f0 100644 --- a/blueprints/networking/hub-and-spoke-vpn/README.md +++ b/blueprints/networking/hub-and-spoke-vpn/README.md @@ -114,5 +114,5 @@ module "test" { project_id = "project-1" } -# tftest modules=20 resources=73 +# tftest modules=20 resources=79 ``` diff --git a/blueprints/networking/ilb-next-hop/README.md b/blueprints/networking/ilb-next-hop/README.md index b4b5e6e8..1200d9d2 100644 --- a/blueprints/networking/ilb-next-hop/README.md +++ b/blueprints/networking/ilb-next-hop/README.md @@ -96,5 +96,5 @@ module "test" { project_create = true project_id = "project-1" } -# tftest modules=18 resources=42 +# tftest modules=18 resources=46 ``` diff --git a/blueprints/networking/private-cloud-function-from-onprem/README.md b/blueprints/networking/private-cloud-function-from-onprem/README.md index 111e82a4..4951454f 100644 --- a/blueprints/networking/private-cloud-function-from-onprem/README.md +++ b/blueprints/networking/private-cloud-function-from-onprem/README.md @@ -45,5 +45,5 @@ module "test" { } project_id = "test-project" } -# tftest modules=11 resources=40 +# tftest modules=11 resources=44 ``` diff --git a/blueprints/networking/shared-vpc-gke/README.md b/blueprints/networking/shared-vpc-gke/README.md index f413becf..a60dea0c 100644 --- a/blueprints/networking/shared-vpc-gke/README.md +++ b/blueprints/networking/shared-vpc-gke/README.md @@ -80,5 +80,5 @@ module "test" { prefix = "test" root_node = "organizations/0123456789" } -# tftest modules=11 resources=43 +# tftest modules=11 resources=45 ``` diff --git a/blueprints/serverless/cloud-run-corporate/README.md b/blueprints/serverless/cloud-run-corporate/README.md index a91df33b..b31a50ce 100644 --- a/blueprints/serverless/cloud-run-corporate/README.md +++ b/blueprints/serverless/cloud-run-corporate/README.md @@ -238,7 +238,7 @@ module "test" { prj_onprem_id = "onprem-project-id" } -# tftest modules=15 resources=46 +# tftest modules=15 resources=50 ``` ```hcl @@ -262,7 +262,7 @@ module "test" { tf_identity = "user@example.org" } -# tftest modules=15 resources=32 +# tftest modules=15 resources=36 ``` ```hcl @@ -281,5 +281,5 @@ module "test" { custom_domain = "cloud-run-corporate.example.org" } -# tftest modules=14 resources=43 +# tftest modules=14 resources=45 ``` diff --git a/modules/cloudsql-instance/README.md b/modules/cloudsql-instance/README.md index a595fc7e..a8e5d597 100644 --- a/modules/cloudsql-instance/README.md +++ b/modules/cloudsql-instance/README.md @@ -39,7 +39,7 @@ module "db" { database_version = "POSTGRES_13" tier = "db-g1-small" } -# tftest modules=3 resources=9 inventory=simple.yaml +# tftest modules=3 resources=11 inventory=simple.yaml ``` ## Cross-regional read replica diff --git a/modules/gke-hub/README.md b/modules/gke-hub/README.md index d9d14c62..a9411949 100644 --- a/modules/gke-hub/README.md +++ b/modules/gke-hub/README.md @@ -119,7 +119,7 @@ module "hub" { } } -# tftest modules=4 resources=16 inventory=full.yaml +# tftest modules=4 resources=18 inventory=full.yaml ``` ## Multi-cluster mesh on GKE @@ -314,7 +314,7 @@ module "hub" { ] } -# tftest modules=8 resources=32 +# tftest modules=8 resources=34 ``` diff --git a/modules/net-vpc-firewall-policy/README.md b/modules/net-vpc-firewall-policy/README.md index ec468a77..5392a0b7 100644 --- a/modules/net-vpc-firewall-policy/README.md +++ b/modules/net-vpc-firewall-policy/README.md @@ -59,7 +59,7 @@ module "firewall-policy" { } } } -# tftest modules=2 resources=7 +# tftest modules=2 resources=9 ``` diff --git a/tests/modules/net_vpc/examples/dns-policies.yaml b/tests/modules/net_vpc/examples/dns-policies.yaml index a30d6408..3999e91f 100644 --- a/tests/modules/net_vpc/examples/dns-policies.yaml +++ b/tests/modules/net_vpc/examples/dns-policies.yaml @@ -36,7 +36,3 @@ counts: google_compute_network: 1 google_compute_subnetwork: 1 google_dns_policy: 1 - modules: 1 - resources: 3 - -outputs: {} diff --git a/tests/modules/net_vpc/examples/googleapis.yaml b/tests/modules/net_vpc/examples/googleapis.yaml new file mode 100644 index 00000000..6248db51 --- /dev/null +++ b/tests/modules/net_vpc/examples/googleapis.yaml @@ -0,0 +1,39 @@ +# 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +values: + module.vpc.google_compute_route.gateway["private-6-googleapis"]: + dest_range: 2600:2d00:0002:2000::/64 + name: my-vpc-private-6-googleapis + next_hop_gateway: default-internet-gateway + next_hop_ilb: null + next_hop_instance: null + next_hop_vpn_tunnel: null + priority: 1000 + project: my-project + tags: null + module.vpc.google_compute_route.gateway["restricted-6-googleapis"]: + dest_range: 2600:2d00:0002:1000::/64 + name: my-vpc-restricted-6-googleapis + next_hop_gateway: default-internet-gateway + next_hop_ilb: null + next_hop_instance: null + next_hop_vpn_tunnel: null + priority: 1000 + project: my-project + tags: null + +counts: + google_compute_network: 1 + google_compute_route: 2 diff --git a/tests/modules/net_vpc/examples/simple.yaml b/tests/modules/net_vpc/examples/simple.yaml index 799852c0..2a5b1ee2 100644 --- a/tests/modules/net_vpc/examples/simple.yaml +++ b/tests/modules/net_vpc/examples/simple.yaml @@ -44,7 +44,31 @@ values: region: europe-west2 role: null secondary_ip_range: [] + module.vpc.google_compute_route.gateway["private-googleapis"]: + dest_range: 199.36.153.8/30 + name: my-network-private-googleapis + next_hop_gateway: default-internet-gateway + next_hop_ilb: null + next_hop_instance: null + next_hop_vpn_tunnel: null + priority: 1000 + project: my-project + tags: null + timeouts: null + module.vpc.google_compute_route.gateway["restricted-googleapis"]: + description: Terraform-managed. + dest_range: 199.36.153.4/30 + name: my-network-restricted-googleapis + next_hop_gateway: default-internet-gateway + next_hop_ilb: null + next_hop_instance: null + next_hop_vpn_tunnel: null + priority: 1000 + project: my-project + tags: null + timeouts: null counts: google_compute_network: 1 google_compute_subnetwork: 2 + google_compute_route: 2 diff --git a/tests/modules/net_vpc/examples/subnet-iam.yaml b/tests/modules/net_vpc/examples/subnet-iam.yaml index ce853c71..8aa5bed8 100644 --- a/tests/modules/net_vpc/examples/subnet-iam.yaml +++ b/tests/modules/net_vpc/examples/subnet-iam.yaml @@ -54,5 +54,4 @@ counts: google_compute_subnetwork: 2 google_compute_subnetwork_iam_binding: 1 google_compute_subnetwork_iam_member: 2 - -outputs: {} + google_compute_route: 2