📈 GH Trending Explorer 🎲 Surprise me

← all repos

terraform-google-modules / terraform-google-network

git clone https://github.com/terraform-google-modules/terraform-google-network.git v18.3.1 · 15d ago 🔥 on GitHub Trending today

Sets up a new VPC network on Google Cloud

+0
stars, 24h · #23,729
+0
stars, 7 days · #32,276
+0
stars, 30 days · #35,905
501
★ total
1.3k
forks · 19 open issues

Star history (as recorded here)

2026-10-20 · 501 ★ 2026-10-23 · 501 ★
LanguageHCL
LicenseApache-2.0
Created2018-07-03 (8y ago)
Last push2d ago
Watchers44
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-23 — #6 monthly in hcl
  • 2026-10-23 — #7 weekly in hcl
  • 2026-10-22 — #9 daily in hcl
  • 2026-10-22 — #6 monthly in hcl
  • 2026-10-22 — #7 weekly in hcl
  • 2026-10-21 — #6 monthly in hcl
  • 2026-10-20 — #6 monthly in hcl

GitHub topics

Links

README excerpt
# Terraform Network Module
This module makes it easy to set up a new VPC Network in GCP by defining your network and subnet ranges in a concise syntax.
It supports creating:
- A Google Virtual Private Network (VPC)
- Subnets within the VPC
- Secondary ranges for the subnets (if applicable)
- routes
- firewall rules
- network firewall policy
- hierarchical firewall policy
- serverless vpc access connector
- network connectivity center
Sub modules are provided for creating individual vpc, subnets, routes, firewall rules, network firewall policies, hierarchical firewall policy, serverless vpc access connector and network connectivity center. See the modules directory for the various sub modules usage.
- vpc
- subnet
- route
- firewall rules
- network firewall policy
- hierarchical firewall policy
- serverless vpc access connector
- network connectivity center
## Compatibility
This module is meant for use with Terraform 1.3+.
If you find incompatibilities using Terraform `>=1.3`, please open an issue.
## Usage
Comprehensive examples are available in examples folder. Simple usage:
 [code] 
Then perform the following commands on the root folder:
- `terraform init` to get the plugins
- `terraform plan` to see the infrastructure plan
- `terraform apply` to apply the infrastructure build
- `terraform destroy` to destroy the built infrastructure
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| auto\_create\_subnetworks | When set to true, the network is created in 'auto subnet mode' and it will create a subnet for each region automatically across the 10.128.0.0/9 address range. When set to false, the network is created in 'custom subnet mode' so the user can explicitly connect subnetwork resources. | `bool` | `false` | no |
| bgp\_always\_compare\_med | If set to true, the Cloud Router will use MED values from the peer even if the AS paths differ. Default is false. | `bool` | `false` | no |
| bgp\_best\_path\_selection\_mode | Specifies the BGP best path selection mode. Valid values are `STANDARD` or `LEGACY`. Default is `LEGACY`. | `string` | `"LEGACY"` | no |
| bgp\_inter\_region\_cost | Specifies the BGP inter-region cost mode. Valid values are `DEFAULT` or `ADD_COST_TO_MED`. | `string` | `null` | no |
| delete\_default\_internet\_gateway\_routes | If set, ensure that all routes within the network specified whose names begin with 'default-route' and with a next hop of 'default-internet-gateway' are deleted | `bool` | `false` | no |
| description | An optional description of this resource. The resource must be recreated to modify this field. | `string` | `""` | no |
| egress\_rules | List of egress rules. This will be ignored if variable 'rules' is non-empty | list(object({ name = string description = optional(string, null) disabled = optional(bool, null) priority = optional(number, null) destination_ranges = optional(list(string), []) source_ranges = optional(list(string), []) source_tags