Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit fdbbea5

Browse files
authored
Describe enabling Debugging API access scopes for GCE instances in README (#224)
PR-URL: #224
1 parent 1e8e6bc commit fdbbea5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ the [Google Cloud Console][dev-console]. You can start adding snapshots and log-
4141

4242
## Running on Google Cloud Platform
4343

44-
Stackdriver debugger agent should work out of the box if your code is running on Google Cloud Platform, just make sure that the [Stackdriver Debugger API][debugger-api] is enabled on your project (this is the default).
44+
The Stackdriver Debugger Agent should work without manually provided authentication credentials for instances running on Google Cloud Platform, as long as the [Stackdriver Debugger API][debugger-api] access scope is enabled on that instance. For Google App Engine instances, this is automatic if the Debugger API has been enabled for your project (which it is by default).
45+
46+
For Google Compute Engine instances, you need to explicitly enable the Debugger API access scope for each instance. When creating a new instance through the GCP web console, you can do this in one of two ways under **Identity and API access**:
47+
* Use the Compute Engine default service account and select "Allow full access to all Cloud APIs" under Access scopes.
48+
* Select a service account with the [**Cloud Debugger Agent**][debugger-roles] role, which contains the necessary permissions (or any other role with at least the same permissions). You may need to create one if you don't have one already.
49+
50+
You may add the Stackdriver Debugger API access scope to existing Compute instances if they are running as a non-default service account by adding the Cloud Debugger Agent role to the service account. For more information, see the docs for [Creating and Enabling Service Accounts for Instances][service-account-docs].
4551

4652
## Running elsewhere
4753

@@ -134,6 +140,8 @@ As soon as that line of code is reached in any of the running instances of your
134140
[cloud-console-projects]: https://console.cloud.google.com/iam-admin/projects
135141
[app-default-credentials]: https://cloud.google.com/identity/protocols/application-default-credentials
136142
[service-account]: https://console.cloud.google.com/apis/credentials/serviceaccountkey
143+
[service-account-docs]: https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances
144+
[debugger-roles]: https://cloud.google.com/debugger/docs/iam#roles
137145
[npm-image]: https://img.shields.io/npm/v/@google-cloud/debug.svg
138146
[npm-url]: https://npmjs.org/package/@google-cloud/debug
139147
[travis-image]: https://travis-ci.org/GoogleCloudPlatform/cloud-debug-nodejs.svg?branch=master

0 commit comments

Comments
 (0)