Medium1 markMultiple Choice

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

You are setting up a custom network topology. You need to create a new VPC network that does not automatically create subnets, and then you need to manually add a subnet to it in the us-west1 region.

Which sequence of gcloud commands should you use?

Answer options:

A.

gcloud compute networks create my-vpc --subnet-mode=custom, followed by gcloud compute networks subnets create my-subnet --network=my-vpc --region=us-west1 --range=10.0.0.0/24

B.

gcloud compute networks create my-vpc --subnet-mode=auto, followed by gcloud compute networks subnets create my-subnet --network=my-vpc --region=us-west1

C.

gcloud compute networks create my-vpc --subnet-mode=custom. No second command is needed as custom mode creates subnets automatically.

D.

gcloud compute networks subnets create my-subnet --network=default --region=us-west1

How to approach this question

Identify the flag that prevents automatic subnet creation (`--subnet-mode=custom`), then find the command to create the subnet.

Full Answer

A.`gcloud compute networks create my-vpc --subnet-mode=custom`, followed by `gcloud compute networks subnets create my-subnet --network=my-vpc --region=us-west1 --range=10.0.0.0/24`✓ Correct
To create a VPC without automatic subnets, you must specify `--subnet-mode=custom` during network creation. After the custom VPC is created, it has no IP ranges. You must then use the `gcloud compute networks subnets create` command to manually define subnets, specifying the network, region, and IP CIDR range.

Common mistakes

Confusing auto mode and custom mode behaviors.

Practice the full GCP Associate Cloud Engineer Practice Exam 5

50 questions · hints · full answers · grading

More questions from this exam