
Answer-first summary for fast verification
Answer: Use gcloud config set compute/region europe-west1 to set the default region for future gcloud commands.
The correct answer is **B** because this command sets the default region for future gcloud commands, ensuring that the specified region is used unless overridden by a command parameter. - **Option A** is incorrect because Cloud Shell does not default to the location from which it's launched. - **Option C** is incorrect because this command is intended for setting a zone, not a region. - **Option D** is incorrect because establishing a VPN to a specific subnet does not influence the gcloud command's default region.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your project has all its Compute Engine resources in the europe-west1 region. You want to set europe-west1 as the default region for gcloud commands. What should you do?
A
Create a VPN from on-premises to a subnet in europe-west1, and use that connection when executing gcloud commands.
B
Use gcloud config set compute/region europe-west1 to set the default region for future gcloud commands.
C
Use Cloud Shell instead of the command line interface of your device. Launch Cloud Shell after you navigate to a resource in the europe-west1 region. The europe-west1 region will automatically become the default region.
D
Use gcloud config set compute/zone europe-west1 to set the default region for future gcloud commands.
No comments yet.