Skip to content

Instantly share code, notes, and snippets.

@darkslategrey
Forked from scjody/gc
Created July 13, 2018 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkslategrey/c15feaa1e3c5b4fda971737114308a35 to your computer and use it in GitHub Desktop.
Save darkslategrey/c15feaa1e3c5b4fda971737114308a35 to your computer and use it in GitHub Desktop.
"gcloud config" wrapper to easily select the correct configuration
#!/bin/bash
if [[ -z "$1" ]]; then
gcloud config configurations list;
else
case "$1" in
# These clauses implement aliases for my most commonly used configurations.
# Change them to support your needs or remove them.
prod)
gcloud config configurations activate default
;;
test)
gcloud config configurations activate plotly-testing
;;
*)
gcloud config configurations activate "$1"
;;
esac;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment