Last active
May 25, 2022 20:48
-
-
Save froi/4bea0f69408e349dd03447f06d3bb0a3 to your computer and use it in GitHub Desktop.
gcp helper commands
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
#!/usr/bin/env zsh | |
# These commands can be configured somewhat in ~/.cbtrc | |
# full docs at https://cloud.google.com/bigtable/docs/cbt-overview#create-cbtrc | |
instance="" | |
project_id="" | |
table_name="" | |
# Delete all rows in a table | |
cbt -instance ${instance} \ | |
-project ${project_id} \ | |
deleteallrows ${tabale_name} |
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
#!/usr/bin/env zsh | |
# user web login / auth flow | |
gcloud auth login | |
# user web login / auth flow to get default app creds JSON | |
gcloud auth application-default login |
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
#!/usr/bin/env zsh | |
config_name="" | |
# Create GCloud configuration | |
# TODO | |
# Activate configuration | |
gcloud config configurations activate ${config_name} |
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
#!/usr/bin/env zsh | |
cluster="" | |
project="" | |
region="" | |
gcloud config configurations activate ${project} | |
gcloud container clusters get-credentials ${cluster} --region ${region} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment