gcloud topic configurations

NAME
gcloud topic configurations - supplementary help for named configurations
DESCRIPTION
gcloud properties can be stored in named configurations, which are collections of key-value pairs that influence the behavior of gcloud.

Named configurations are intended to be an advanced feature, and you can probably ignore them entirely if you only work with one project.

Properties that are commonly stored in configurations include default Google Compute Engine zone, verbosity level, project ID, and active user or service account. Configurations allow you to define and enable these and other settings together as a group.

Configuration data is typically stored in $HOME/.config/gcloud, you can override this location by setting the environment variable CLOUDSDK_CONFIG. This can be useful if $HOME points to a read only filesystem or you are running commands inside docker.

Configurations are especially useful if you:

  • Work with multiple projects. You can create a separate configuration for each project.
  • Use multiple accounts, for example, a user account and a service account, etc.
  • Perform generally orthogonal tasks (work on an appengine app in project foo, administer a Google Compute Engine cluster in zone user-central-1a, manage the network configurations for region asia-east-1, etc.)

Property information stored in named configurations are readable by all gcloud commands and may be modified by gcloud config set and gcloud config unset.

Creating configurations
Named configurations may be defined by users or built into gcloud.

User defined configurations have lowercase names, such as 'johndoe', 'default', 'jeff-staging', or 'foo2'. These are defined by the following regular expression: ^[a-z][-a-z0-9]*$

Additionally there is a builtin configuration named NONE that has no properties set.

The easiest way to create a brand new configuration is by running

gcloud init

This will guide you through setting up your first named configuration, creating a new named configuration, or reinitializing an existing named configuration. (Note: reinitializing an existing configuration will remove all its existing properties!)

You can create a new empty configuration with

gcloud config configurations create my-config
Using configurations
gcloud may have at most one active configuration which provides property values. Inactive configurations have no effect on gcloud executions.

You can activate a configuration with

gcloud config configurations activate my-config

To display the path of the active configuration, run:

gcloud info --format="get(config.paths.active_config_path)"

Note that changes to your OS login, Google Cloud Platform account or project could change the path.

You can view and change the properties of your active configuration using the following commands:

gcloud config list
gcloud config set

Additionally, commands under gcloud config configurations allow you to to list, activate, describe, and delete configurations that may or may not be active.

You can activate a configuration for a single gcloud invocation using flag, --configuration my-config, or environment variable CLOUDSDK_ACTIVE_CONFIG_NAME=my-config.

AVAILABLE PROPERTIES
core
account
Account gcloud should use for authentication. Run gcloud auth list to see your currently available accounts.
console_log_format
Control the format used to display log messages to the console.

Valid values are:

  • standard - Simplified log messages are displayed on the console.
  • detailed - More detailed messages are displayed on the console.

If unset, default is standard.

custom_ca_certs_file
Absolute path to a custom CA cert file.
default_format
Sets the default format for printing command resources. core/default_format overrides the default yaml format. If the command contains a command-specific output format, it takes precedence over the core/default_format value. Use --verbosity=debug flag to view the command-specific format. Both core/format and --format also take precedence over core/default_format. The supported formats are limited to: config, default, disable, flattened, json, list, none, object, text. For more details run $ gcloud topic formats. Run $ gcloud config set --help to see more information about core/default_format
default_regional_backend_service
If True, backend services in gcloud compute backend-services will be regional by default. Setting the --global flag is required for global backend services.
disable_color
If True, color will not be used when printing messages in the terminal.
disable_file_logging
If True, gcloud will not store logs to a file. This may be useful if disk space is limited.
disable_prompts
If True, the default answer will be assumed for all user prompts. However, for any prompts that require user input, an error will be raised. This is equivalent to either using the global --quiet flag or setting the environment variable CLOUDSDK_CORE_DISABLE_PROMPTS to 1. Setting this property is useful when scripting with gcloud.
disable_usage_reporting
If True, anonymous statistics on SDK usage will not be collected. This value is set by your choices during installation, but can be changed at any time. For more information, see Usage statistics.
format
Sets the format for printing all command resources. This overrides the default command-specific human-friendly output format. Use --verbosity=debug flag to view the command-specific format. If both core/default_format and core/format are specified, core/format takes precedence. If both core/format and --format are specified, --format takes precedence. The supported formats are limited to: config, default, disable, flattened, json, list, none, object, text. For more details run $ gcloud topic formats. Run $ gcloud config set --help to see more information about core/format
log_http
If True, log HTTP requests and responses to the logs. To see logs in the terminal, adjust verbosity settings. Otherwise, logs are available in their respective log files.
max_log_days
Maximum number of days to retain log files before deleting. If set to 0, turns off log garbage collection and does not delete log files. If unset, the default is 30 days.
parse_error_details
If True, gcloud will attempt to parse and interpret error details in API originating errors. If False, gcloud will write flush error details as is to stderr/log.
pass_credentials_to_gsutil
If True, pass the configured Google Cloud CLI authentication to gsutil.
project
Project ID of the Cloud Platform project to operate on by default. This can be overridden by using the global --project flag.
show_structured_logs
Control when JSON-structured log messages for the current verbosity level (and above) will be written to standard error. If this property is disabled, logs are formatted as text by default.

Valid values are:

  • never - Log messages as text
  • always - Always log messages as JSON
  • log - Only log messages as JSON if stderr is a file
  • terminal - Only log messages as JSON if stderr is a terminal

If unset, default is never.

trace_token
Token used to route traces of service requests for investigation of issues. This token will be provided by Google support.
universe_domain
Sets the domain of the universe to use for API requests.
user_output_enabled
True, by default. If False, messages to the user and command output on both standard output and standard error will be suppressed.
verbosity
Default logging verbosity for gcloud commands. This is the equivalent of using the global --verbosity flag. Supported verbosity levels: debug, info, warning, error, critical, and none.
accessibility
screen_reader
Make gcloud more screen reader friendly.
ai
region
Default region to use when working with AI Platform resources. When a --region flag is required but not provided, the command will fall back to this value, if set.
ai_platform
region
Default region to use when working with AI Platform Training and Prediction resources (currently for Prediction only). It is ignored for training resources for now. The value should be either global or one of the supported regions. When a --region flag is required but not provided, the command will fall back to this value, if set.
api_endpoint_overrides
accessapproval
Overrides API endpoint for gcloud access-approval command group. Defaults to https://accessapproval.googleapis.com/
accesscontextmanager
Overrides API endpoint for gcloud access-context-manager command group. Defaults to https://accesscontextmanager.googleapis.com/
agentidentity
Overrides API endpoint for gcloud agent-identity command group. Defaults to https://agentidentity.googleapis.com/
ai
Overrides API endpoint for gcloud ai command group.
aiplatform
Overrides API endpoint for gcloud ai-platform command group. Defaults to https://aiplatform.googleapis.com/
anthosevents
Overrides API endpoint for gcloud anthos command group. Defaults to https://anthosevents.googleapis.com/
anthospolicycontrollerstatus_pa
Overrides API endpoint for gcloud container fleet policycontroller command group. Defaults to https://anthospolicycontrollerstatus-pa.googleapis.com/
apigateway
Overrides API endpoint for gcloud api-gateway command group. Defaults to https://apigateway.googleapis.com/
apigee
Overrides API endpoint for gcloud apigee command group. Defaults to https://apigee.googleapis.com/
appengine
Overrides API endpoint for gcloud app command group. Defaults to