- 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 setandgcloud 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 initThis 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
activeconfiguration which provides property values. Inactive configurations have no effect on gcloud executions.You can activate a configuration with
gcloud config configurations activate my-configTo 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 listgcloud config setAdditionally, commands under
gcloud config configurationsallow 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 variableCLOUDSDK_ACTIVE_CONFIG_NAME=my-config. - AVAILABLE PROPERTIES
-
core-
account-
Account
gcloudshould use for authentication. Rungcloud auth listto 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_formatoverrides the default yaml format. If the command contains a command-specific output format, it takes precedence over thecore/default_formatvalue. Use--verbosity=debugflag to view the command-specific format. Bothcore/formatand--formatalso take precedence overcore/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 --helpto see more information aboutcore/default_format default_regional_backend_service-
If True, backend services in
gcloud compute backend-serviceswill be regional by default. Setting the--globalflag 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,
gcloudwill 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
--quietflag or setting the environment variableCLOUDSDK_CORE_DISABLE_PROMPTSto 1. Setting this property is useful when scripting withgcloud. 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=debugflag to view the command-specific format. If bothcore/default_formatandcore/formatare specified,core/formattakes precedence. If bothcore/formatand--formatare specified,--formattakes 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 --helpto see more information aboutcore/format log_http-
If True, log HTTP requests and responses to the logs. To see logs in the
terminal, adjust
verbositysettings. 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,
gcloudwill attempt to parse and interpret error details in API originating errors. If False,gcloudwill 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
--projectflag. 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
textby 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
gcloudcommands. This is the equivalent of using the global--verbosityflag. Supported verbosity levels:debug,info,warning,error,critical, andnone.
accessibility-
screen_reader- Make gcloud more screen reader friendly.
ai-
region-
Default region to use when working with AI Platform resources. When a
--regionflag 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
globalor one of the supported regions. When a--regionflag 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-approvalcommand group. Defaults tohttps://accessapproval.googleapis.com/ accesscontextmanager-
Overrides API endpoint for
gcloud access-context-managercommand group. Defaults tohttps://accesscontextmanager.googleapis.com/ agentidentity-
Overrides API endpoint for
gcloud agent-identitycommand group. Defaults tohttps://agentidentity.googleapis.com/ ai-
Overrides API endpoint for
gcloud aicommand group. aiplatform-
Overrides API endpoint for
gcloud ai-platformcommand group. Defaults tohttps://aiplatform.googleapis.com/ anthosevents-
Overrides API endpoint for
gcloud anthoscommand group. Defaults tohttps://anthosevents.googleapis.com/ anthospolicycontrollerstatus_pa-
Overrides API endpoint for
gcloud container fleet policycontrollercommand group. Defaults tohttps://anthospolicycontrollerstatus-pa.googleapis.com/ apigateway-
Overrides API endpoint for
gcloud api-gatewaycommand group. Defaults tohttps://apigateway.googleapis.com/ apigee-
Overrides API endpoint for
gcloud apigeecommand group. Defaults tohttps://apigee.googleapis.com/ appengine-
Overrides API endpoint for
gcloud appcommand group. Defaults to