Q: How do you design a multi-tier Shared VPC architecture in GCP for an enterprise with 20 product squads? How do you grant squads network access without letting them alter firewall rules or routing tables?
Architectural playbook for deploying a centralized Google Cloud Shared VPC across Host and Service Projects, ensuring security isolation, subnetwork IAM delegation, and centralized egress filtering.
Want to master this scenario in a live sandbox? Stephane Maarek's AWS Certified DevOps Engineer Professional Masterclass on Udemy covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: In a large enterprise migration to GCP, product teams needed autonomous control over their Compute Engine and GKE clusters while network engineers required strict central governance over IP ranges, firewalls, and Cloud NAT.
Designate Host Project & Subnet IP Carving
Establish a dedicated Network Host Project with non-overlapping RFC 1918 CIDR allocations:
- Host Project: Designated
network-core-prodas the Shared VPC Host Project. - Subnet Segregation: Created private subnets across regions:
subnet-prod-us-central1 (10.100.0.0/20)with secondary alias ranges for GKE Pods and Services. - Cloud Router & NAT: Deployed regional Cloud Routers with Cloud NAT for private internet egress.
Attach Service Projects & Delegate Subnet Permissions
Attach application projects to the host project and grant granular IAM roles:
- Attach Projects: Attached
billing-app-prodandauth-app-prodas Service Projects. - Subnet User Role: Granted
roles/compute.networkUserstrictly at the individual subnetwork level, not project level. - Targeted Access: Service projects can deploy VMs/GKE onto their designated subnet, but cannot view or attach to other squads' subnets.
Grant Permissions for GKE Service Agents
Allow GKE in service projects to manage firewall rules and load balancers:
- GKE Service Agent: Granted
roles/container.hostServiceAgentUserto the Service Project GKE Service Agent on the Host Project. - Google APIs Service Agent: Granted
roles/compute.networkUserto the Google APIs service agent in the host project.
Enforce Hierarchical Firewall Policies & Cloud DNS Peering
Centralize security governance and private service resolution:
- Hierarchical Firewall Policies: Enforced mandatory organization-level rules (e.g. block SSH 0.0.0.0/0, mandate IAP bastion).
- Cloud DNS Private Zones: Hosted all private domains in the Host Project and established DNS Peering with on-premises datacenters.
- Created a centralized Host Project managing shared regional subnets with secondary GKE IP ranges.
- Attached product service projects and granted compute.networkUser strictly at the individual subnetwork level.
- Provisioned GKE hostServiceAgentUser permissions so container clusters could deploy Cloud Load Balancers.
- Enforced organizational hierarchical firewall policies to guarantee zero public ingress without IAP.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Engineering bespoke in-house developer tools instead of adopting standardized platform Golden Paths when configuring Designing Enterprise Shared Bespoke internal tools create long-term maintenance debt and fragmented workflows, whereas standardized Golden Paths accelerate delivery.
- Overlooking infrastructure cost visibility and FinOps allocation tagging across multi-tenant environments when configuring Designing Enterprise Shared Without granular resource tagging, engineering organizations cannot attribute cloud infrastructure costs to specific teams or business units.
- Failing to define explicit Service Level Objectives (SLOs) and Error Budgets to balance feature velocity with reliability when configuring Designing Enterprise Shared Without agreed SLOs, engineering and product teams lack an objective data-driven framework to prioritize technical debt over new features.
- Neglecting automated continuous drift detection between declarative configuration and deployed cloud state when configuring Designing Enterprise Shared Unmanaged drift accumulates over time, causing future automated deployments to fail or overwrite emergency manual adjustments.