Medium1 markMultiple Choice

GCP ACE · Question 29 · Domain 3.5: Deploying and implementing networking resources

You are setting up a new Google Cloud environment and need to create a Virtual Private Cloud (VPC). You want full control over the IP address ranges used in your subnets and do not want Google to automatically create subnets in every region.

Which command should you use to create the VPC?

Answer options:

A.

gcloud compute networks create my-vpc --subnet-mode=auto

B.

gcloud compute networks create my-vpc --subnet-mode=custom

C.

gcloud compute vpc create my-vpc --type=custom

D.

gcloud networks create my-vpc --mode=manual

How to approach this question

Identify the VPC creation mode that prevents automatic subnet generation.

Full Answer

B.gcloud compute networks create my-vpc --subnet-mode=custom✓ Correct
When creating a VPC network in Google Cloud, you can choose between 'auto' mode and 'custom' mode. Auto mode automatically creates a subnet in every region with predefined IP ranges. Custom mode creates a VPC with no subnets, giving you full control to create subnets only where you need them, with IP ranges you specify. The command is `gcloud compute networks create [NAME] --subnet-mode=custom`.

Common mistakes

Using auto mode, which can lead to overlapping IP ranges if you later connect this VPC to an on-premises network.

Practice the full GCP Associate Cloud Engineer Practice Exam 7

50 questions · hints · full answers · grading

More questions from this exam