| name | gcloud-config |
| description | CLI properties & configurations via gcloud (`gcloud config`). View and edit Google Cloud CLI properties — configurations. |
gcloud config — CLI properties & configurations
Overview
gcloud config manages the gcloud CLI itself, not a Google Cloud product. It reads and writes the properties that control gcloud's behavior — the default project, account, Compute Engine region/zone, log verbosity, proxy settings, prompt suppression, and more — and organizes them into named configurations you can switch between. Reach for it to set your defaults once (so you stop passing --project on every command), to keep separate property sets for different projects or environments, or to tune gcloud for scripting and CI.
Everything here is client-side: it operates on local files under ~/.config/gcloud (Linux/macOS) or %APPDATA%\gcloud (Windows). There is no API to enable and no IAM role required to set or read these properties.
Quick reference — common workflows
1. Initial project / region / zone setup
gcloud config set project PROJECT_ID
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-a
gcloud config list
2. Read or list individual properties
gcloud config get project
gcloud config get compute/zone
gcloud config list compute/ --all
3. Create and switch between named configurations (multi-project)
gcloud config configurations create staging
gcloud config set project staging-project-456
gcloud config set compute/region europe-west1
gcloud config configurations describe staging
gcloud config configurations activate default
gcloud config configurations list
4. Run a single command under a different configuration
gcloud config list --configuration=staging
5. Unset properties (active config vs. installation-wide)
gcloud config unset compute/zone
gcloud config unset compute/region --installation
6. Rename and delete configurations
gcloud config configurations rename staging --new-name=staging-eu
gcloud config configurations activate default
gcloud config configurations delete staging-eu
gcloud config configurations delete old-config1 old-config2
7. Tune gcloud for scripting / CI
gcloud config set disable_prompts true
gcloud config set proxy/type http
gcloud config set proxy/address 1.234.56.78
gcloud config set proxy/port 8080
gcloud config set compute/region us-central1 --installation
Command groups
| Group | Reference file | Commands | Description |
|---|
config (top level) | _commands.md | 4 | get, list, set, unset — read and edit individual properties |
config configurations | configurations.md | 6 | manage the set of gcloud named configurations |
See index.md for a one-line index of all 10 commands.
Common flags & tips
SECTION/PROPERTY syntax — properties are namespaced by section (compute/region, proxy/port). The core/ prefix is optional, so project and core/project are equivalent; other sections must be named explicitly.
--installation (on set and unset) — writes to the installation-wide config that backs every configuration, instead of only the active one. Use it for machine-wide defaults; per-configuration values still override it.
--all (on list and configurations describe) — includes unset properties. With list you may combine --all only with a section, e.g. gcloud config list compute/ --all; you cannot pass both --all and a specific property name.
--configuration=NAME — a gcloud-wide flag (works on any gcloud command) that runs under a named configuration for that single invocation without activating it.
- Can't delete the active config —
configurations delete refuses the active configuration even when overridden with --configuration; activate another one first. delete accepts multiple names.
configurations create activates by default — pass --no-activate to create without switching.
configurations rename requires --new-name — e.g. --new-name=new-config.
- Filtering/sorting lists —
gcloud config configurations list and gcloud config list support --filter, --limit, and --sort-by, plus the usual gcloud-wide --format (e.g. --format="value(name)").
- Cloud Shell caveat — in Cloud Shell, gcloud preferences live in a temporary per-tab folder and do not persist across sessions unless you configure persistence.
Official documentation