updated gcp_cli_create_credential.sh

pull/2/head
Hari Sekhon 3 years ago
parent 7767261904
commit c6f43b56bf

@ -52,9 +52,9 @@ help_usage "$@"
name="${1:-$USER-cli}" name="${1:-$USER-cli}"
# XXX: sets the GCP project for the duration of the script for consistency purposes (relying on gcloud config could lead to race conditions)
project="${3:-${CLOUDSDK_CORE_PROJECT:-$(gcloud config list --format='get(core.project)')}}" project="${3:-${CLOUDSDK_CORE_PROJECT:-$(gcloud config list --format='get(core.project)')}}"
# XXX: sets the GCP project for the duration of the script for consistency purposes (relying on gcloud config could lead to race conditions)
not_blank "$project" || die "ERROR: no project specified and \$CLOUDSDK_CORE_PROJECT / GCloud SDK config core.project value not set" not_blank "$project" || die "ERROR: no project specified and \$CLOUDSDK_CORE_PROJECT / GCloud SDK config core.project value not set"
export CLOUDSDK_CORE_PROJECT="$project" export CLOUDSDK_CORE_PROJECT="$project"

Loading…
Cancel
Save