All Modules
GCPNetworking

VPC

VPC network with subnets, Cloud NAT, firewall rules, and IAP access

Usage

module "vpc" {
  source = "github.com/fencepencil/gcp-modules//vpc"

  project_id = "<project_id>"
  name = "<name>"
  subnets = { key = "value" }

  tags = var.tags
}

Inputs (6)

NameTypeDescriptionDefaultRequired
project_idstringGCP project IDyes
namestringName of the VPC networkyes
subnetsmap(object)Subnet configurationsyes
create_nat_gatewayboolCreate Cloud NAT gatewaystrueno
enable_flow_logsboolEnable VPC flow logsfalseno
enable_iapboolEnable IAP SSH/RDP firewall ruletrueno

Outputs (4)

NameDescription
network_idID of the VPC network
network_nameName of the VPC network
network_self_linkSelf link of the VPC
subnet_idsMap of subnet names to IDs

More GCP Modules

Browse our full library of GCP infrastructure modules.

View all GCP modules