Associate Cloud Engineer ยท VPC design and firewalls
Shared VPC: host and service projects
Host and service projects, Shared VPC Admin, subnet-level permissions (compute.networkUser), when to use Shared VPC vs VPC peering.
Key points
- A Shared VPC Admin enables a project as a host project and attaches service projects to it.
- Resources in service projects get IPs from the host's subnets.
- Access to subnets is granted with roles/compute.networkUser, at project level (all subnets) or per subnet.
- Everything must sit in one organization, and a project is either host or service, never both.
Source: https://docs.cloud.google.com/vpc/docs/shared-vpc
Practice questions
In Shared VPC, which project owns the shared network and its subnets?
- Each service project
- The host project
- The organization's billing project
- Whichever project created the first VM
Show answer
Answer: B. The host project
The host project owns the Shared VPC network; service projects only use its subnets.
Which statements about Shared VPC are correct?
- A project cannot be a host and a service project at once
- A service project attaches to only one host project
- Host and service projects belong to the same organization
- A service project may attach to several host projects
- Host and service projects can be in different organizations
Show answer
Answer: A. A project cannot be a host and a service project at once, B. A service project attaches to only one host project, C. Host and service projects belong to the same organization
A project cannot be both host and service, each service project attaches to one host, and everything stays inside one organization.
A project can act as a Shared VPC host project and a service project at the same time.
Show answer
Answer: False
False. A project is either a host or a service project, never both.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
