Medium1 markMultiple Choice

GCP ACE · Question 19 · Domain 3.1: Deploying and implementing Compute Engine resources

You need to quickly launch a new Compute Engine instance named 'web-server-01' using the e2-medium machine type in the us-central1-a zone.

Which gcloud command should you use?

Answer options:

A.

gcloud compute create instance web-server-01 --type=e2-medium --zone=us-central1-a

B.

gcloud compute instances create web-server-01 --machine-type=e2-medium --zone=us-central1-a

C.

gcloud instances create web-server-01 --machine-type=e2-medium --zone=us-central1-a

D.

gcloud compute vms create web-server-01 --machine-type=e2-medium --zone=us-central1-a

How to approach this question

Remember the standard gcloud structure: gcloud [component] [resource] [action] [name] [flags].

Full Answer

B.gcloud compute instances create web-server-01 --machine-type=e2-medium --zone=us-central1-a✓ Correct
gcloud compute instances create web-server-01 --machine-type=e2-medium --zone=us-central1-a
The correct command structure for creating a VM is `gcloud compute instances create [INSTANCE_NAME]`. You then append flags to specify configurations, such as `--machine-type` for the size and `--zone` for the location. Options A, C, and D use incorrect syntax or incorrect resource names.

Common mistakes

Using `vms` instead of `instances`, or getting the verb order wrong (`create instance` instead of `instances create`).

Practice the full GCP Associate Cloud Engineer Practice Exam 6

50 questions · hints · full answers · grading

More questions from this exam