
Answer-first summary for fast verification
Answer: Use the `gcloud config` subcommand to set the europe-west1-d zone as the default zone.
**A** is correct because configuring the default zone via the `gcloud config` subcommand allows the gcloud CLI to automatically apply the europe-west1-d zone to all subsequent commands, eliminating the need to specify it each time. This is achieved by executing `gcloud config set compute/zone europe-west1-d`. **B** is incorrect as the GCP console's Settings page does not influence the gcloud CLI's default zone settings. **C** is incorrect because the gcloud CLI does not support setting the default zone via a configuration file in its installation directory. **D** is incorrect because metadata entries on Compute Engine instances do not affect the gcloud CLI's default zone configuration. For persistent default zone settings across terminal sessions, consider adding the configuration command to your `~/.bashrc` file.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your company operates a global beauty products web application and has recently adopted Google Cloud Platform (GCP). After installing the gcloud command line interface (CLI) and authenticating it with your Google Account, you're managing several Compute Engine instances in the europe-west1-d region via CLI. How can you streamline your workflow by avoiding the need to specify the zone with every CLI command?
A
Use the gcloud config subcommand to set the europe-west1-d zone as the default zone.
B
Navigate to the Compute Engine Settings page and set the europe-west1-d zone under Default location.
C
Place a file named default.conf in the CLI installation directory, containing the line: zone=europe-west1-d.
D
Add a Metadata entry on the Compute Engine page with the key compute/zone and value europe-west1-d.