"gcloud config" wrapper to easily select the correct configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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
Put this in your path to make selecting configurations easier.