Medium1 markMultiple Choice

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

You have created a custom-mode Virtual Private Cloud (VPC) network named 'my-vpc'. You now need to create a subnet named 'frontend-subnet' in the europe-west1 region with the IP range 10.0.1.0/24.

Which gcloud command should you use?

Answer options:

A.

gcloud compute subnets create frontend-subnet --vpc=my-vpc --region=europe-west1 --cidr=10.0.1.0/24

B.

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

C.

gcloud vpc subnets create frontend-subnet --network=my-vpc --region=europe-west1 --range=10.0.1.0/24

D.

gcloud compute networks create frontend-subnet --type=subnet --network=my-vpc --region=europe-west1

How to approach this question

Recall the gcloud command structure for networking: gcloud compute networks subnets create.

Full Answer

B.gcloud compute networks subnets create frontend-subnet --network=my-vpc --region=europe-west1 --range=10.0.1.0/24✓ Correct
The correct command to create a subnet is `gcloud compute networks subnets create [SUBNET_NAME]`. You must specify the parent network (`--network`), the region (`--region`), and the IP address range (`--range`).

Common mistakes

Using incorrect flags like `--cidr` or `--vpc`, or looking for a `gcloud vpc` command group.

Practice the full GCP Associate Cloud Engineer Practice Exam 3

50 questions · hints · full answers · grading

More questions from this exam