Courseiva
Setting Up a Cloud Solution EnvironmenteasyMultiple ChoiceObjective-mapped

Google ACE Setting Up a Cloud Solution Environment Practice Question

You want to switch between multiple GCP projects frequently using the gcloud CLI. What is the recommended approach?

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

Create multiple configuration profiles and activate them as needed.

Configuration profiles (gcloud config configurations) allow you to create named configurations with different project, region, and zone settings. You can activate one with 'gcloud config configurations activate'. Setting individual properties each time is error-prone. Running gcloud init each time is slow. Using separate terminals isn't efficient.

Answer analysis

Option-by-option breakdown

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

  • Open separate terminal windows for each project.

    Why it's wrong here

    Opening separate terminal windows per project does not inherently switch GCP contexts; each window still uses the same default active gcloud configuration unless you manually export environment variables such as CLOUDSDK_ACTIVE_CONFIG_NAME or run gcloud config configurations activate in each one. This creates fragile, memory-based management that fails when you forget which window maps to which project, and it doesn't scale to automating project switches in scripts or CI/CD pipelines. It is a workaround, not a CLI-based solution.

  • Run gcloud init every time you switch projects.

    Why it's wrong here

    gcloud init is an interactive setup command that walks through authentication, selects a default project, and configures account preferences from scratch. Running it each time you switch projects is overkill because it re-initializes the entire configuration, possibly forcing re-authentication and resetting custom properties you had previously set. It also prompts for input and overwrites the currently active configuration, making frequent switching slow, disruptive, and prone to accidentally erasing environment-specific settings.

  • Use gcloud config set project each time you switch.

    Why it's wrong here

    Using gcloud config set project only changes the project property inside the single active configuration, leaving other settings like compute/region, account, or custom quotas untouched. This means if you switch between projects that require different regions or service accounts, you must issue multiple gcloud config set commands individually for each property, which is tedious and error-prone. Additionally, this mutates one shared configuration, so every switch requires manual resetting, whereas configurations isolate these values cleanly for instant, reversible switching.

  • Create multiple configuration profiles and activate them as needed.

    Why this is correct

    Creating multiple named configurations with gcloud config configurations create and activating them via gcloud config configurations activate is the officially recommended pattern for frequent context switching. Each configuration stores its own project, account, region, and other properties, so you can define a distinct environment for every GCP project or workflow. Activation is instantaneous and deterministic, and you can even use the --configuration flag to run a single command in a non-default configuration without changing your active context, enabling safe automation and parallel work.

About these practice questions

Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.