Net-vpc-factory (#3696)

This PR (re :D)introduces module net-vpc-factory, a minimal factory that deals with vpcs, subnets, and firewall rules creation, meant to be embedded into other factories, starting with 2-data-platform and 2-networking.
This commit is contained in:
Simone Ruffilli
2026-02-04 11:36:58 +01:00
committed by GitHub
parent 2af44b0651
commit 1404fb20da
22 changed files with 1406 additions and 6512 deletions

View File

@@ -0,0 +1,120 @@
# Copyright 2024 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.net-vpc-factory.module.firewall["data-vpc-0"].google_compute_firewall.custom-rules["allow-iap"]:
allow:
- ports:
- '22'
protocol: tcp
deny: []
description: Allow IAP for SSH
direction: INGRESS
disabled: false
log_config: []
name: allow-iap
network: data-vpc-0
params: []
priority: 1000
project: my-host-project-id
source_ranges:
- 35.235.240.0/20
source_service_accounts: null
source_tags: null
target_service_accounts: null
target_tags:
- ssh
timeouts: null
module.net-vpc-factory.module.vpcs["data-vpc-0"].google_compute_network.network[0]:
auto_create_subnetworks: true
delete_bgp_always_compare_med: false
delete_default_routes_on_create: true
description: Terraform managed
enable_ula_internal_ipv6: null
name: data-vpc-0
network_firewall_policy_enforcement_order: AFTER_CLASSIC_FIREWALL
network_profile: null
params: []
project: my-host-project-id
routing_mode: GLOBAL
timeouts: null
module.net-vpc-factory.module.vpcs["data-vpc-0"].google_compute_route.gateway["directpath-googleapis"]:
description: Terraform-managed.
dest_range: 34.126.0.0/18
name: data-vpc-0-directpath-googleapis
network: data-vpc-0
next_hop_gateway: default-internet-gateway
next_hop_ilb: null
next_hop_instance: null
next_hop_vpn_tunnel: null
params: []
priority: 1000
project: my-host-project-id
tags: null
timeouts: null
module.net-vpc-factory.module.vpcs["data-vpc-0"].google_compute_route.gateway["private-googleapis"]:
description: Terraform-managed.
dest_range: 199.36.153.8/30
name: data-vpc-0-private-googleapis
network: data-vpc-0
next_hop_gateway: default-internet-gateway
next_hop_ilb: null
next_hop_instance: null
next_hop_vpn_tunnel: null
params: []
priority: 1000
project: my-host-project-id
tags: null
timeouts: null
module.net-vpc-factory.module.vpcs["data-vpc-0"].google_compute_route.gateway["restricted-googleapis"]:
description: Terraform-managed.
dest_range: 199.36.153.4/30
name: data-vpc-0-restricted-googleapis
network: data-vpc-0
next_hop_gateway: default-internet-gateway
next_hop_ilb: null
next_hop_instance: null
next_hop_vpn_tunnel: null
params: []
priority: 1000
project: my-host-project-id
tags: null
timeouts: null
module.net-vpc-factory.module.vpcs["data-vpc-0"].google_compute_subnetwork.subnetwork["europe-west1/primary-subnet"]:
description: Terraform-managed.
ip_cidr_range: 10.10.0.0/24
ip_collection: null
ipv6_access_type: null
log_config: []
name: primary-subnet
network: data-vpc-0
params: []
private_ip_google_access: true
project: my-host-project-id
region: europe-west1
reserved_internal_range: null
resolve_subnet_mask: null
role: null
send_secondary_ip_range_if_empty: true
timeouts: null
counts:
google_compute_firewall: 1
google_compute_network: 1
google_compute_route: 3
google_compute_subnetwork: 1
modules: 3
resources: 6
outputs: {}