Skip to content

Instantly share code, notes, and snippets.

@leafnode
Created May 22, 2019 07:35
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 leafnode/8f5ee47f98f248559c21a3d03587277b to your computer and use it in GitHub Desktop.
Save leafnode/8f5ee47f98f248559c21a3d03587277b to your computer and use it in GitHub Desktop.
Spanner
#!/bin/bash
gcloud spanner instances create test-instance --config=regional-us-central1 \
--description="Test Instance" --nodes=1
gcloud iam service-accounts create [NAME]
gcloud projects add-iam-policy-binding [PROJECT_ID] --member "serviceAccount:[NAME]@[PROJECT_ID].iam.gserviceaccount.com" --role "roles/owner"
gcloud iam service-accounts keys create [FILE_NAME].json --iam-account [NAME]@[PROJECT_ID].iam.gserviceaccount.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment