0
0
GCPcloud~30 mins

Custom VPC creation in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Custom VPC creation
📖 Scenario: You are setting up a new Google Cloud environment for a small company. They want a custom Virtual Private Cloud (VPC) network to control their cloud resources and traffic.
🎯 Goal: Create a custom VPC network with one subnet in a specific region. This network will be the foundation for deploying cloud resources securely.
📋 What You'll Learn
Create a custom VPC network named custom-vpc
Add a subnet named custom-subnet in the us-central1 region
Set the subnet IP range to 10.0.0.0/24
Ensure the VPC is set to custom subnet mode
💡 Why This Matters
🌍 Real World
Custom VPCs let companies control their cloud network layout, improving security and traffic management.
💼 Career
Cloud engineers often create and manage VPCs to isolate resources and meet organizational policies.
Progress0 / 4 steps
1
Create a custom VPC network
Create a variable called network_name and set it to the string custom-vpc.
GCP
Need a hint?

Use quotes around the network name string.

2
Define the subnet configuration
Create a dictionary called subnet_config with keys name, region, and ip_cidr_range. Set their values to custom-subnet, us-central1, and 10.0.0.0/24 respectively.
GCP
Need a hint?

Use curly braces to create the dictionary and separate keys and values with colons.

3
Create the VPC network configuration
Create a dictionary called vpc_config with keys name, auto_create_subnetworks, and subnetworks. Set name to network_name, auto_create_subnetworks to False, and subnetworks to a list containing subnet_config.
GCP
Need a hint?

Remember to use the variable network_name for the name key and put subnet_config inside a list for subnetworks.

4
Add the final VPC creation command
Create a dictionary called create_vpc_request with a single key network set to vpc_config.
GCP
Need a hint?

This dictionary represents the final request to create the VPC network.