
上QQ阅读APP看书,第一时间看更新
Gcloud config
To avoid having to specify the zone or other parameters, you can set them in the config with:
And to unset them in the config, you can use the following:
For a list of all the different settings available in the config, run gcloud config set --help.
The zone and region can be also stored in the environment variable CLOUDSDK_COMPUTE_ZONE and CLOUDSDK_COMPUTE_REGION. Environment variables override default properties that you set with the gcloud config commands, but do not override explicit flags like --zone or --region.
To set the environment variable CLOUDSDK_COMPUTE_ZONE, run or add this line to your .bashrc:
For more details, see https://cloud.google.com/compute/docs/gcloud-compute/#set_default_zone_and_region_in_your_local_client.