Skip to content

Instantly share code, notes, and snippets.

@froi
Last active May 25, 2022 20:48
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 froi/4bea0f69408e349dd03447f06d3bb0a3 to your computer and use it in GitHub Desktop.
Save froi/4bea0f69408e349dd03447f06d3bb0a3 to your computer and use it in GitHub Desktop.
gcp helper commands
#!/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}
#!/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
#!/usr/bin/env zsh
config_name=""
# Create GCloud configuration
# TODO
# Activate configuration
gcloud config configurations activate ${config_name}
#!/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