google cloud sharing projects

Dec 23, 2014  

In the past (and yes, for some things, in the present too1) a few Google products have had UI with ambiguous workflows, or where it wasn’t clear if or how to accomplish something.

So check this out; I found it magical2, you can easily try this with multiple Google accounts. In the cloud console3, click on your project, then “Permissions” in the top left, and “Add Member”.

Enter the account, and then select the “sharing level” of the new account (with the same semantics as, say, Google Docs – you either own, edit, or view) and confirm.

Log in from the other account, go to the project, view a VM, click “SSH” and Boom, just like that, everything works!

This gist4 shows all the steps that were needed!

# Download the command-line utilities
$ curl https://sdk.cloud.google.com | bash
 
## Authenticate
$ gcloud auth login
 
## Sanity check
$ gcloud info
 
## One-time configuration to avoid specifying command-line flags
$ gcloud config set project "<project_id>"
$ gcloud config set compute/zone us-central1-a
 
## Login!
$ gcloud compute ssh agam@myvm

  1. No comment [return]
  2. Ok, maybe everyone expects this and everything else works this well too, but it’s still wow [return]
  3. https://console.developers.google.com/ [return]
  4. https://gist.github.com/agam/9f3207a7cdcd72745748 [return]