Courseiva
mediumMultiple ChoiceObjective-mapped

Google ACE Practice Question: A developer frequently switches between three GCP…

A developer frequently switches between three GCP projects and accounts throughout the day. They want to avoid rerunning `gcloud init` each time. Which gcloud feature lets them save and switch between pre-configured project/account/region combinations?

⚠ Common exam trap

Many exam-takers confuse `gcloud config configurations` with a non-existent feature like 'gcloud environments' or assume that gcloud supports per-directory configuration files (like `.env` files), when in fact it relies on explicit named configurations stored globally.

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 named configurations created with `gcloud config configurations create`

`gcloud config configurations` allow a developer to create, save, and switch between named sets of gcloud properties (project, account, region, zone) without re-running `gcloud init`. Each configuration stores its own active account, project ID, and default compute region/zone, and can be activated instantly with `gcloud config configurations activate <name>`, making it ideal for frequent context switching between multiple GCP projects and accounts.

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 environments — a built-in workspace manager

    Why it's wrong here

    The `gcloud environments` command group does not exist in the Cloud SDK. Google Cloud CLI manages context via named configurations, not a built-in workspace manager. Running `gcloud environments` yields an unrecognized command error, and there is no hidden workspace abstraction that stores project/account state. The only valid way to save and switch contexts is `gcloud config configurations`, which supersedes any notion of an 'environments' workspace.

  • gcloud named configurations created with `gcloud config configurations create`

    Why this is correct

    Named configurations are the official mechanism for managing multiple Google Cloud contexts in a single gcloud installation. Created with `gcloud config configurations create [NAME]`, each configuration stores a distinct combination of account, project, region, and zone. `gcloud config configurations activate [NAME]` instantly switches to a different context, and `gcloud config list` shows the active configuration. This avoids repeatedly setting `--project` flags or juggling credentials manually.

  • Separate gcloud installations — one per project

    Why it's wrong here

    Installing separate copies of gcloud for each project is highly impractical and not recommended. Every installation would consume significant disk space and require separate updates, yet they would still share the same underlying authentication flow, causing confusion about which credential is active. Named configurations already provide isolated project, account, and zone settings within one SDK, so per-project installations solve a problem that the CLI was explicitly designed to handle with configurations.

  • A .gcloudrc file in each project directory that gcloud reads automatically

    Why it's wrong here

    There is no `.gcloudrc` file that gcloud automatically reads from project directories. gcloud relies on named configurations stored in the user's home directory (e.g., `~/.config/gcloud/configurations`), not on per-directory dotfiles. While you can set environment variables like `CLOUDSDK_ACTIVE_CONFIG_NAME` to override the active configuration, that is global to the shell session, not project-scoped. The documented workflow is to create and activate configurations, never to place a `.gcloudrc` file in a project folder.

About these practice questions

This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.