0
0
GCPcloud~30 mins

Shared VPC concept in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Setting Up a Shared VPC in Google Cloud
📖 Scenario: You work for a company that wants to centralize network management. The company uses Google Cloud Platform (GCP) and wants to set up a Shared VPC. This allows one project to host the network resources, while other projects can use the network securely.Your task is to create a Shared VPC host project, enable Shared VPC, and attach a service project to it.
🎯 Goal: Build a Shared VPC setup in GCP by creating a host project with a VPC network, enabling Shared VPC on it, and attaching a service project to use the shared network.
📋 What You'll Learn
Create a host project with a VPC network named shared-vpc-network
Enable Shared VPC on the host project
Create a service project
Attach the service project to the host project as a Shared VPC service project
💡 Why This Matters
🌍 Real World
Many companies use Shared VPC to centralize network management and improve security by separating network resources from workloads.
💼 Career
Cloud engineers and network administrators often set up Shared VPCs to manage large cloud environments efficiently.
Progress0 / 4 steps
1
Create the host project and VPC network
Create a GCP project called host-project and inside it create a VPC network named shared-vpc-network with automatic subnet creation disabled.
GCP
Need a hint?

Use gcloud projects create to create the project and gcloud compute networks create with --subnet-mode=custom to create the VPC network.

2
Enable Shared VPC on the host project
Enable Shared VPC on the host-project by associating the shared-vpc-network as a Shared VPC network.
GCP
Need a hint?

Use gcloud compute shared-vpc enable host-project to enable Shared VPC on the host project.

3
Create the service project
Create a GCP project called service-project that will use the Shared VPC network from the host project.
GCP
Need a hint?

Use gcloud projects create service-project to create the service project.

4
Attach the service project to the Shared VPC host project
Attach the service-project to the host-project as a Shared VPC service project so it can use the shared-vpc-network.
GCP
Need a hint?

Use gcloud compute shared-vpc associated-projects add service-project --host-project=host-project to attach the service project.