{"id":46337248,"url":"https://github.com/squareops/terraform-google-network","last_synced_at":"2026-03-04T19:05:30.362Z","repository":{"id":181797035,"uuid":"650948972","full_name":"squareops/terraform-google-network","owner":"squareops","description":"Terraform module to create Networking resources for workload deployment on Google Cloud.","archived":false,"fork":false,"pushed_at":"2025-02-07T07:35:06.000Z","size":662,"stargazers_count":1,"open_issues_count":1,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-13T09:54:02.713Z","etag":null,"topics":["gcp","terraform","vpc"],"latest_commit_sha":null,"homepage":"https://squareops.com","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/squareops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-08T06:52:49.000Z","updated_at":"2023-07-17T09:19:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8e3da39-96d5-410a-80aa-2e8cc0dda085","html_url":"https://github.com/squareops/terraform-google-network","commit_stats":null,"previous_names":["squareops/terraform-google-network"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/squareops/terraform-google-network","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squareops%2Fterraform-google-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squareops%2Fterraform-google-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squareops%2Fterraform-google-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squareops%2Fterraform-google-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squareops","download_url":"https://codeload.github.com/squareops/terraform-google-network/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squareops%2Fterraform-google-network/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30090041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T18:31:08.343Z","status":"ssl_error","status_checked_at":"2026-03-04T18:31:07.708Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcp","terraform","vpc"],"created_at":"2026-03-04T19:05:29.614Z","updated_at":"2026-03-04T19:05:30.347Z","avatar_url":"https://github.com/squareops.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCP VPC Network Terraform Module\n\n![squareops_avatar]\n\n[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png\n\n### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey.\n\n\u003cbr\u003e\nTerraform module to create Networking resources for workload deployment on Google Cloud.\n\n## Usage Example\n\n```hcl\nmodule \"network\" {\n  source                                          = \"squareops/network/google\"\n  name                                            = \"identifier\"\n  project_name                                    = \"project_name\"\n  environment                                     = \"dev\"\n  region                                          = \"asia-south1\"\n  ip_cidr_range                                   = \"10.0.0.0/16\"\n  secondary_ip_range = [\n    {\n      range_name    = \"tf-test-secondary-range1\"\n      ip_cidr_range = \"192.168.10.0/24\"\n    },\n    {\n      range_name    = \"tf-test-secondary-range2\"\n      ip_cidr_range = \"192.168.11.0/24\"\n    }\n  ]\n  private_ip_google_access                        = true\n  private_ipv6_google_access                      = false\n  enable_nat_gateway                              = true\n  db_private_access                               = true\n  create_vpn                                      = true\n  vpc_flow_logs                                   = true\n}\n```\nRefer [examples](https://github.com/sq-ia/terraform-google-network/blob/main/examples/complete) for more details.\n\n## Important Note\nTo prevent destruction interruptions, any resources that have been created outside of Terraform and attached to the resources provisioned by Terraform must be deleted before the module is destroyed.\nThis module makes it easy to set up a new VPC Network in GCP by defining your network and subnet ranges in a concise syntax.\n\nThis module supports creating:\n\n- A Google Virtual Private Network (VPC)\n- A Subnet within the VPC\n- Private service connection in VPC\n- A Google Cloud NAT with Router\n- A VPN Server with External IP\n\n### Configure a Service Account\nIn order to execute this module you must have a Service Account with the roles mentioned in [IAM.md](https://github.com/sq-ia/terraform-google-network/blob/main/IAM.md).\n\n\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.13.0 |\n| \u003ca name=\"requirement_google\"\u003e\u003c/a\u003e [google](#requirement\\_google) | \u003e= 4.51, \u003c 5.0 |\n| \u003ca name=\"requirement_google-beta\"\u003e\u003c/a\u003e [google-beta](#requirement\\_google-beta) | \u003e= 4.51, \u003c 5.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_google\"\u003e\u003c/a\u003e [google](#provider\\_google) | \u003e= 4.51, \u003c 5.0 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_cloud-nat\"\u003e\u003c/a\u003e [cloud-nat](#module\\_cloud-nat) | terraform-google-modules/cloud-nat/google | 4.0.0 |\n| \u003ca name=\"module_firewall_rules\"\u003e\u003c/a\u003e [firewall\\_rules](#module\\_firewall\\_rules) | terraform-google-modules/network/google//modules/firewall-rules | ~\u003e 7.0 |\n| \u003ca name=\"module_subnets\"\u003e\u003c/a\u003e [subnets](#module\\_subnets) | ./modules/subnets | n/a |\n| \u003ca name=\"module_vpn_server\"\u003e\u003c/a\u003e [vpn\\_server](#module\\_vpn\\_server) | ./modules/vpn | n/a |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [google_compute_global_address.private_ip_block](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_global_address) | resource |\n| [google_compute_network.network](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_network) | resource |\n| [google_compute_router.router](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_router) | resource |\n| [google_service_networking_connection.private_vpc_connection](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_networking_connection) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_auto_create_subnetworks\"\u003e\u003c/a\u003e [auto\\_create\\_subnetworks](#input\\_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 |\n| \u003ca name=\"input_create_vpn\"\u003e\u003c/a\u003e [create\\_vpn](#input\\_create\\_vpn) | Specifies whether to create a VPN server. | `bool` | `false` | no |\n| \u003ca name=\"input_db_private_access\"\u003e\u003c/a\u003e [db\\_private\\_access](#input\\_db\\_private\\_access) | Specifies whether to create a private VPC connection for the database. | `bool` | `false` | no |\n| \u003ca name=\"input_delete_default_internet_gateway_routes\"\u003e\u003c/a\u003e [delete\\_default\\_internet\\_gateway\\_routes](#input\\_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 |\n| \u003ca name=\"input_enable_nat_gateway\"\u003e\u003c/a\u003e [enable\\_nat\\_gateway](#input\\_enable\\_nat\\_gateway) | Specifies whether to create a NAT gateway. | `bool` | `false` | no |\n| \u003ca name=\"input_environment\"\u003e\u003c/a\u003e [environment](#input\\_environment) | The environment name used for tagging and prefixing resource names being created. | `string` | `\"dev\"` | no |\n| \u003ca name=\"input_ip_cidr_range\"\u003e\u003c/a\u003e [ip\\_cidr\\_range](#input\\_ip\\_cidr\\_range) | The IP CIDR range for the subnet. | `string` | n/a | yes |\n| \u003ca name=\"input_log_config\"\u003e\u003c/a\u003e [log\\_config](#input\\_log\\_config) | The logging options for the subnetwork flow logs. Setting this value to `null` will disable them. See https://www.terraform.io/docs/providers/google/r/compute_subnetwork.html for more information and examples. | \u003cpre\u003eobject({\u003cbr\u003e    aggregation_interval = string\u003cbr\u003e    flow_sampling        = number\u003cbr\u003e    metadata             = string\u003cbr\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr\u003e  \"aggregation_interval\": \"INTERVAL_10_MIN\",\u003cbr\u003e  \"flow_sampling\": 0.5,\u003cbr\u003e  \"metadata\": \"INCLUDE_ALL_METADATA\"\u003cbr\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_log_config_filter_nat\"\u003e\u003c/a\u003e [log\\_config\\_filter\\_nat](#input\\_log\\_config\\_filter\\_nat) | Specifies the desired filtering of logs on this NAT. Valid values are: \"ERRORS\\_ONLY\", \"TRANSLATIONS\\_ONLY\", \"ALL\". | `string` | `\"ALL\"` | no |\n| \u003ca name=\"input_machine_type\"\u003e\u003c/a\u003e [machine\\_type](#input\\_machine\\_type) | The machine type for the VPN server. | `string` | `\"e2-medium\"` | no |\n| \u003ca name=\"input_mtu\"\u003e\u003c/a\u003e [mtu](#input\\_mtu) | The network MTU (If set to 0, meaning MTU is unset - defaults to '1460'). Recommended values: 1460 (default for historic reasons), 1500 (Internet default), or 8896 (for Jumbo packets). Allowed are all values in the range 1300 to 8896, inclusively. | `number` | `0` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | The suffix name for the resources being created. | `string` | n/a | yes |\n| \u003ca name=\"input_private_ip_google_access\"\u003e\u003c/a\u003e [private\\_ip\\_google\\_access](#input\\_private\\_ip\\_google\\_access) | Whether instances in the subnet can access Google services using private IP addresses. | `bool` | `true` | no |\n| \u003ca name=\"input_private_ipv6_google_access\"\u003e\u003c/a\u003e [private\\_ipv6\\_google\\_access](#input\\_private\\_ipv6\\_google\\_access) | Whether instances in the subnet can access Google services using IPv6 addresses. | `bool` | `false` | no |\n| \u003ca name=\"input_project_name\"\u003e\u003c/a\u003e [project\\_name](#input\\_project\\_name) | The project ID where the resources will be deployed. | `string` | `\"fresh-sanctuary-389006\"` | no |\n| \u003ca name=\"input_region\"\u003e\u003c/a\u003e [region](#input\\_region) | The region where the resources will be deployed. | `string` | `\"asia-south1\"` | no |\n| \u003ca name=\"input_routing_mode\"\u003e\u003c/a\u003e [routing\\_mode](#input\\_routing\\_mode) | The network routing mode (default 'GLOBAL') | `string` | `\"GLOBAL\"` | no |\n| \u003ca name=\"input_secondary_ip_range\"\u003e\u003c/a\u003e [secondary\\_ip\\_range](#input\\_secondary\\_ip\\_range) | List of secondary IP ranges for the subnetwork. Each element in the list must have 'range\\_name' and 'ip\\_cidr\\_range' attributes. | \u003cpre\u003elist(object({\u003cbr\u003e    range_name    = string\u003cbr\u003e    ip_cidr_range = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_source_subnetwork_ip_ranges_to_nat\"\u003e\u003c/a\u003e [source\\_subnetwork\\_ip\\_ranges\\_to\\_nat](#input\\_source\\_subnetwork\\_ip\\_ranges\\_to\\_nat) | (Optional) Specifies how NAT should be configured per Subnetwork. Valid values include: ALL\\_SUBNETWORKS\\_ALL\\_IP\\_RANGES, ALL\\_SUBNETWORKS\\_ALL\\_PRIMARY\\_IP\\_RANGES, LIST\\_OF\\_SUBNETWORKS. Changing this forces a new NAT to be created. Defaults to ALL\\_SUBNETWORKS\\_ALL\\_IP\\_RANGES. | `string` | `\"ALL_SUBNETWORKS_ALL_IP_RANGES\"` | no |\n| \u003ca name=\"input_vpc_flow_logs\"\u003e\u003c/a\u003e [vpc\\_flow\\_logs](#input\\_vpc\\_flow\\_logs) | Enable or disable flow logging for subnets. | `bool` | `false` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_network\"\u003e\u003c/a\u003e [network](#output\\_network) | The VPC resource being created |\n| \u003ca name=\"output_network_id\"\u003e\u003c/a\u003e [network\\_id](#output\\_network\\_id) | The ID of the VPC being created |\n| \u003ca name=\"output_network_name\"\u003e\u003c/a\u003e [network\\_name](#output\\_network\\_name) | The name of the VPC being created |\n| \u003ca name=\"output_network_self_link\"\u003e\u003c/a\u003e [network\\_self\\_link](#output\\_network\\_self\\_link) | The URI of the VPC being created |\n| \u003ca name=\"output_region\"\u003e\u003c/a\u003e [region](#output\\_region) | The region where the VPC is located. |\n| \u003ca name=\"output_secondary_ip_range\"\u003e\u003c/a\u003e [secondary\\_ip\\_range](#output\\_secondary\\_ip\\_range) | The details of secondary ip range of subnet |\n| \u003ca name=\"output_subnet_name\"\u003e\u003c/a\u003e [subnet\\_name](#output\\_subnet\\_name) | List of Subnets created |\n| \u003ca name=\"output_vpn_name\"\u003e\u003c/a\u003e [vpn\\_name](#output\\_vpn\\_name) | The name of the Pritunl VPN instance. Null if VPN creation is disabled. |\n| \u003ca name=\"output_vpn_zone\"\u003e\u003c/a\u003e [vpn\\_zone](#output\\_vpn\\_zone) | The zone of the Pritunl VPN instance. Null if VPN creation is disabled. |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n\n## Contribute \u0026 Issue Report\n\nTo report an issue with a project:\n\n  1. Check the repository's [issue tracker](https://github.com/sq-ia/terraform-google-network/issues) on GitHub\n  2. Search to check if the issue has already been reported\n  3. If you can't find an answer to your question in the documentation or issue tracker, you can ask a question by creating a new issue. Make sure to provide enough context and details.\n\n## License\n\nApache License, Version 2.0, January 2004 (https://www.apache.org/licenses/LICENSE-2.0)\n\n## Support Us\n\nTo support our GitHub project by liking it, you can follow these steps:\n\n  1. Visit the repository: Navigate to the [GitHub repository](https://github.com/sq-ia/terraform-google-network)\n\n  2. Click the \"Star\" button: On the repository page, you'll see a \"Star\" button in the upper right corner. Clicking on it will star the repository, indicating your support for the project.\n\n  3. Optionally, you can also leave a comment on the repository or open an issue to give feedback or suggest changes.\n\nStaring a repository on GitHub is a simple way to show your support and appreciation for the project. It also helps to increase the visibility of the project and make it more discoverable to others.\n\n## Who we are\n\nWe believe that the key to success in the digital age is the ability to deliver value quickly and reliably. That’s why we offer a comprehensive range of DevOps \u0026 Cloud services designed to help your organization optimize its systems \u0026 Processes for speed and agility.\n\n  1. We are an AWS Advanced consulting partner which reflects our deep expertise in AWS Cloud and helping 100+ clients over the last 5 years.\n  2. Expertise in Kubernetes and overall container solution helps companies expedite their journey by 10X.\n  3. Infrastructure Automation is a key component to the success of our Clients and our Expertise helps deliver the same in the shortest time.\n  4. DevSecOps as a service to implement security within the overall DevOps process and helping companies deploy securely and at speed.\n  5. Platform engineering which supports scalable,Cost efficient infrastructure that supports rapid development, testing, and deployment.\n  6. 24*7 SRE service to help you Monitor the state of your infrastructure and eradicate any issue within the SLA.\n\nWe provide [support](https://squareops.com/contact-us/) on all of our projects, no matter how small or large they may be.\n\nTo find more information about our company, visit [squareops.com](https://squareops.com/), follow us on [Linkedin](https://www.linkedin.com/company/squareops-technologies-pvt-ltd/), or fill out a [job application](https://squareops.com/careers/). If you have any questions or would like assistance with your cloud strategy and implementation, please don't hesitate to [contact us](https://squareops.com/contact-us/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareops%2Fterraform-google-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquareops%2Fterraform-google-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareops%2Fterraform-google-network/lists"}