VPC Networks

Virtual Private Cloud

A VPC is your private network in Google Cloud. GCP VPCs are global: one network can have subnets in many regions, and VMs in different regions talk over Google's private backbone.

Example

A custom-mode VPC with one subnet in Mumbai:

gcloud compute networks create shop-vpc --subnet-mode=custom
gcloud compute networks subnets create shop-asia \
  --network=shop-vpc --region=asia-south1 --range=10.10.0.0/20 \
  --enable-private-ip-google-access

Example output

Created [.../global/networks/shop-vpc].
NAME       REGION       NETWORK   RANGE
shop-asia  asia-south1  shop-vpc  10.10.0.0/20

Private Connectivity

NeedUse
VMs without public IPs reach the internetCloud NAT
private VMs reach Google APIsPrivate Google Access
Cloud Run reaches private resources (Cloud SQL private IP, Redis)Direct VPC egress / Serverless VPC connector
connect to an on-premises networkCloud VPN or Cloud Interconnect
connect two VPCsVPC Network Peering