Courseiva
Setting Up a Cloud Solution EnvironmentmediumMultiple ChoiceObjective-mapped

Google ACE Setting Up a Cloud Solution Environment Practice Question

You want to use gcloud CLI to set the default project to 'my-project' and the default compute zone to 'us-central1-a'. Which two gcloud config commands should you run?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

gcloud config set project my-project and gcloud config set compute/zone us-central1-a

The commands are 'gcloud config set project my-project' and 'gcloud config set compute/zone us-central1-a'.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • gcloud config configurations set project my-project and gcloud config configurations set zone us-central1-a

    Why it's wrong here

    gcloud config configurations is reserved for managing named configuration profiles, not for setting individual properties. There is no `set` subcommand under it; the valid subcommands are `create`, `activate`, `list`, `describe`, and `delete`. To assign a property value, you must use `gcloud config set` with the fully qualified property name, and in this case the zone would need to be `compute/zone`, so this option is invalid on two counts.

  • gcloud config set project my-project and gcloud config set compute/zone us-central1-a

    Why this is correct

    The correct way to set the default project is `gcloud config set project my-project`, which updates the active configuration's core project property. The zone must be set as `compute/zone` because it belongs to the compute section of the property hierarchy; `gcloud config set compute/zone us-central1-a` is the accepted syntax. Together these commands ensure that subsequent gcloud commands automatically use the intended project and zone, which is essential for quick CLI workflows.

  • gcloud config set project my-project and gcloud config set zone us-central1-a

    Why it's wrong here

    This option correctly sets the project, but the second command fails because `gcloud config set` requires a valid hierarchical property name. The property for the default zone is `compute/zone`, not the bare word `zone`; the CLI does not recognize a root-level zone property and will return an error. As a result, only the project is properly configured, leaving the default zone unset and potentially causing zonal operations to require an explicit --zone flag.

  • gcloud projects set my-project and gcloud compute zones set us-central1-a

    Why it's wrong here

    Neither `gcloud projects set` nor `gcloud compute zones set` exists in the gcloud CLI, so this entire option is invalid. `gcloud projects` is used for project-level operations like retrieving metadata, updates, and IAM policies, while `gcloud compute zones` only lists or describes available zones. Defaults are set exclusively through `gcloud config set`, which stores properties in the active configuration—not through these fabricated imperative verbs.

About these practice questions

One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.