Medium1 markMultiple Choice

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

You are setting up a custom-mode Virtual Private Cloud (VPC) network. You need to create a subnet in the 'us-west1' region with the CIDR block '10.0.1.0/24'.

Which TWO gcloud commands must you run to achieve this? (Select TWO)

Answer options:

A.

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

B.

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

C.

gcloud compute networks subnets create my-subnet --network=my-vpc --region=us-west1 --range=10.0.1.0/24

D.

gcloud compute subnets create my-subnet --vpc=my-vpc --zone=us-west1-a --cidr=10.0.1.0/24

E.

gcloud compute networks add-subnet my-subnet --region=us-west1 --range=10.0.1.0/24

How to approach this question

Remember that creating a custom network is a two-step process: create the VPC, then create the subnet.

Full Answer

gcloud compute networks create my-vpc --subnet-mode=custom, gcloud compute networks subnets create my-subnet --network=my-vpc --region=us-west1 --range=10.0.1.0/24
Creating a custom VPC requires two steps. First, create the network with `--subnet-mode=custom`. Second, create the subnet using `gcloud compute networks subnets create`, specifying the parent network, the region, and the IP range.

Common mistakes

Forgetting to specify `--subnet-mode=custom` when creating the network, which defaults to auto-mode.

Practice the full GCP Associate Cloud Engineer Practice Exam 2

50 questions · hints · full answers · grading

More questions from this exam