Medium1 markMultiple Choice
Domain 1.3: Installing and configuring the CLIgcloudCompute EngineConfiguration

GCP ACE · Question 09 · Domain 1.3: Installing and configuring the CLI

You frequently create Compute Engine instances in the 'europe-west1-b' zone. You are tired of typing the '--zone=europe-west1-b' flag every time you run the 'gcloud compute instances create' command.

Which command will set this zone as your default so you no longer have to specify it?

Answer options:

A.

gcloud compute set zone europe-west1-b

B.

gcloud config set compute/zone europe-west1-b

C.

gcloud config set zone europe-west1-b

D.

gcloud compute zones set default europe-west1-b

How to approach this question

Remember the structure of gcloud config properties: section/property.

Full Answer

B.gcloud config set compute/zone europe-west1-b✓ Correct
gcloud config set compute/zone europe-west1-b
To set default properties in the Cloud SDK, you use `gcloud config set [SECTION]/[PROPERTY] [VALUE]`. For the default compute zone, the section is 'compute' and the property is 'zone'.

Common mistakes

Forgetting the 'compute/' prefix in the property name.

Practice the full GCP Associate Cloud Engineer Practice Exam 2

50 questions · hints · full answers · grading

More questions from this exam