Your company needs a new VPC named corp-net that must contain exactly two subnets: dev-us (10.10.0.0/16) in us-central1 and dev-eu (10.20.0.0/16) in europe-west1. No additional subnets should ever be created automatically. Which approach meets this requirement with the least manual effort?
Run gcloud compute networks create corp-net --subnet-mode=auto, then use gcloud compute networks subnets expand-ip-range to adjust the IP ranges for dev-us and dev-eu.
Create the default VPC, rename two of its existing subnets to dev-us and dev-eu, and change their IP ranges to 10.10.0.0/16 and 10.20.0.0/16.
Create an auto-mode VPC named corp-net, delete every automatically created subnet except dev-us and dev-eu, and rely on this configuration going forward.
Run gcloud compute networks create corp-net --subnet-mode=custom, then create the dev-us and dev-eu subnets with gcloud compute networks subnets create specifying --network=corp-net, the correct --region, and the desired --range CIDR blocks.
Auto mode VPC networks always create one subnet per region at creation time and automatically add new subnets whenever Google Cloud launches a new region, so they cannot guarantee that only the two required subnets will exist. The most straightforward way to meet the requirement is to create the VPC in custom mode, which starts with no subnets, and then explicitly create just the two needed subnets, each with its region and IP CIDR range. Deleting subnets from an auto-mode network or trying to rename/resize default subnets is error-prone and still would not stop future automatic subnet creation. Therefore, the sequence that builds a custom-mode network and then adds the two subnets is the only correct solution.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a VPC in Google Cloud?
Open an interactive chat with Bash
What is the difference between auto-mode and custom-mode VPCs?
Open an interactive chat with Bash
What is an IP CIDR range and why is it important for subnets?
Open an interactive chat with Bash
What is a VPC in GCP?
Open an interactive chat with Bash
What is the difference between auto-mode and custom-mode VPCs in GCP?
Open an interactive chat with Bash
What is CIDR and why is it used in configuring subnets?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Setting up a cloud solution environment
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .