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?
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
Q01What is the primary purpose of a Google Cloud project?EasyQ02Your development team needs to manage Compute Engine instances in a specific project. They need t...MediumQ03You are automating the setup of a new Google Cloud project using a bash script. You need to enabl...EasyQ04Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if yo...MediumQ05Your finance team wants to perform granular analysis of your Google Cloud spending using SQL. The...Hard
Expert