Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is a Shared VPC in Google Cloud?
A Shared VPC lets multiple projects use the same Virtual Private Cloud network. This helps teams share resources securely while keeping control centralized.
Click to reveal answer
beginner
Who manages the Shared VPC host project?
The Shared VPC host project is managed by a central team or admin who controls the network and its settings. Other projects (service projects) use this network.
Click to reveal answer
intermediate
What is the difference between a host project and a service project in Shared VPC?
The host project owns the VPC network. Service projects use the network resources but do not own the network itself.
Click to reveal answer
intermediate
Why use Shared VPC instead of separate VPCs for each project?
Shared VPC allows better security and easier management by centralizing network control. It avoids complex peering and reduces network fragmentation.
Click to reveal answer
intermediate
How do service projects access resources in a Shared VPC?
Service projects use IAM permissions to attach to the Shared VPC network and can create resources like VM instances that use the shared network.
Click to reveal answer
What role does the host project play in a Shared VPC setup?
AManages billing for all projects
BUses the network but does not manage it
COwns and manages the VPC network
DCreates service accounts for other projects
✗ Incorrect
The host project owns and manages the VPC network that other service projects use.
Which of the following is a benefit of using Shared VPC?
AEach project has its own isolated network
BCentralized network management
CNo need for IAM permissions
DAutomatic billing separation
✗ Incorrect
Shared VPC allows centralized network management, improving security and control.
Can a service project create its own VPC network when using Shared VPC?
ANo, it uses the host project's network
BOnly if it has billing permissions
CYes, always
DOnly for private networks
✗ Incorrect
Service projects use the host project's VPC network and do not create their own.
What must be granted to a service project to use a Shared VPC network?
ANo permissions needed
BBilling admin role
COwner role on the host project
DIAM permissions to attach to the host network
✗ Incorrect
Service projects need IAM permissions to attach and use the Shared VPC network.
Which statement about Shared VPC is FALSE?
AService projects manage the VPC network settings
BIt allows multiple projects to share one VPC network
CIt requires a host project to own the network
DIt improves network security and management
✗ Incorrect
Service projects do not manage the VPC network settings; only the host project does.
Explain the roles of host and service projects in a Shared VPC setup.
Think about who controls the network and who uses it.
You got /3 concepts.
Describe the main benefits of using Shared VPC in Google Cloud.
Consider how Shared VPC helps teams work together safely.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of a Shared VPC in Google Cloud Platform?
easy
A. To automatically back up virtual machines across projects
B. To create multiple isolated networks within a single project
C. To allow multiple projects to share the same Virtual Private Cloud network
D. To enable direct internet access for all projects
Solution
Step 1: Understand Shared VPC concept
Shared VPC allows multiple projects to connect to a common Virtual Private Cloud network managed by a host project.
Step 2: Compare options
To allow multiple projects to share the same Virtual Private Cloud network correctly describes this sharing of a VPC across projects. Other options describe unrelated features.
Final Answer:
To allow multiple projects to share the same Virtual Private Cloud network -> Option C
Quick Check:
Shared VPC = Shared network across projects [OK]
Hint: Shared VPC means sharing one network across projects [OK]
Common Mistakes:
Thinking Shared VPC creates isolated networks
Confusing Shared VPC with backups or internet access
Assuming Shared VPC is per project only
2. Which of the following is the correct way to enable Shared VPC on a host project using gcloud CLI?
easy
A. gcloud compute shared-vpc enable-host HOST_PROJECT_ID
B. gcloud projects add-iam-policy-binding HOST_PROJECT_ID --member=shared-vpc
C. gcloud compute shared-vpc enable --project=HOST_PROJECT_ID
D. gcloud compute networks create shared-vpc --project=HOST_PROJECT_ID
Solution
Step 1: Identify correct gcloud command for enabling Shared VPC
The command to enable Shared VPC on a host project is 'gcloud compute shared-vpc enable-host'.
Step 2: Check options
gcloud compute shared-vpc enable-host HOST_PROJECT_ID matches the correct syntax. Others are incorrect commands or unrelated.
Final Answer:
gcloud compute shared-vpc enable-host HOST_PROJECT_ID -> Option A
Quick Check:
Enable Shared VPC host with 'enable-host' command [OK]
Hint: Use 'enable-host' to activate Shared VPC on host project [OK]
Common Mistakes:
Using 'enable' instead of 'enable-host'
Confusing IAM binding with enabling Shared VPC
Trying to create a network instead of enabling Shared VPC
3. Given a Shared VPC setup where Project A is the host and Project B is a service project, what happens if a VM in Project B tries to use a subnet from Project A's Shared VPC?
medium
A. The VM can use the subnet and communicate within the Shared VPC network
B. The VM creation fails because subnets cannot be shared
C. The VM uses a default subnet from Project B instead
D. The VM gets an external IP automatically
Solution
Step 1: Understand Shared VPC subnet usage
In Shared VPC, service projects can create resources using subnets from the host project's VPC.
Step 2: Analyze VM subnet assignment
VM in Project B can use Project A's subnet and communicate within the shared network.
Final Answer:
The VM can use the subnet and communicate within the Shared VPC network -> Option A
Quick Check:
Shared VPC allows subnet sharing for VM networking [OK]
Hint: Service projects use host subnets for VM networking [OK]
Common Mistakes:
Assuming subnets cannot be shared
Thinking VM defaults to service project subnet
Confusing external IP assignment with subnet usage
4. You configured a Shared VPC but a service project cannot create VM instances using the host project's subnets. What is the most likely cause?
medium
A. The host project does not have any subnets created
B. The VM instance name is invalid
C. The service project is not linked to the host project
D. The service project lacks the 'compute.networkUser' role on the host project
Solution
Step 1: Check permissions for service project
Service projects need 'compute.networkUser' role on the host project to use its subnets.
Step 2: Verify linkage and subnet existence
While linkage and subnets are important, lack of permission is the most common cause blocking VM creation.
Final Answer:
The service project lacks the 'compute.networkUser' role on the host project -> Option D
Quick Check:
Missing networkUser role blocks subnet use [OK]
Hint: Check 'compute.networkUser' role for service project [OK]
Common Mistakes:
Ignoring IAM roles and permissions
Assuming linkage alone is enough
Blaming VM name instead of network access
5. You want to design a secure environment where multiple teams have their own projects but share a common network with strict firewall rules managed centrally. How does using Shared VPC help achieve this?
hard
A. It requires each team to create their own VPC and manage firewall rules independently
B. It centralizes network management in one host project while teams use service projects for resources
C. It automatically applies firewall rules per project without central control
D. It isolates each team's network completely with no sharing
Solution
Step 1: Understand Shared VPC central management
Shared VPC lets you manage network and firewall rules centrally in a host project.
Step 2: Analyze team project usage
Teams use service projects to create resources but rely on the shared network and firewall rules from the host project.
Step 3: Compare options
It centralizes network management in one host project while teams use service projects for resources correctly describes this central control with resource separation. Other options describe isolation or decentralized management.
Final Answer:
It centralizes network management in one host project while teams use service projects for resources -> Option B
Quick Check:
Shared VPC centralizes network and firewall control [OK]
Hint: Shared VPC centralizes network, teams use separate projects [OK]
Common Mistakes:
Thinking Shared VPC isolates networks fully
Assuming firewall rules are per project automatically
Believing teams manage their own VPCs independently