Using gcloud-golang from Managed VMs

40 views
Skip to first unread message

Chris Broadfoot

unread,
Sep 3, 2015, 2:53:38 PM9/3/15
to google-a...@googlegroups.com
Hello everyone,

If you're not using the gcloud-golang library ("google.golang.org/cloud") from Managed VMs, this won't affect you.

I just submitted a change to the OAuth library that allows it to be used in a more flexible way from App Engine Managed VMs.

Previously, you needed to use a context returned by appengine.NewContext ("google.golang.org/appengine"). Now, you can use any context (e.g. context.Background()).

If you're using the datastore package ("google.golang.org/cloud/datastore") with the default application credentials, you'll need to give access to the "userinfo.email" scope to the default service account. The "cloud-platform" scope is enabled by default, and that gives access to datastore, storage, pubsub, etc.

You can do this by adding the following to your app.yaml:

beta_settings:
  # NOTE: userinfo.email is required by the Datastore API.
  service_account_scopes: >

Cheers
Chris
Reply all
Reply to author
Forward
0 new messages