Created
February 22, 2022 02:44
-
-
Save tkuchiki/2d830352a8bf2dbf1ed671e7abbcf38d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
project="${1}" | |
instance="${2}" | |
billing_project="${3}" | |
_gcloud() { | |
if [ "${billing_project}" != "" ]; then | |
gcloud --project ${project} --billing-project ${billing_project} "${@}" | |
fi | |
gcloud --project ${project} "${@}" | |
} | |
for db in $(_gcloud spanner databases list --instance=${instance} | awk '{print $1}'); do | |
_gcloud spanner databases delete --instance=${instance} ${db} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment