Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3c68ec3

Browse filesBrowse files
anguillanneufleahecole
authored andcommitted
add a setup step in CLI (GoogleCloudPlatform#2611)
1 parent 46e1d16 commit 3c68ec3
Copy full SHA for 3c68ec3

File tree

Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed

‎appengine/standard_python37/pubsub/README.md

Copy file name to clipboardExpand all lines: appengine/standard_python37/pubsub/README.md
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,24 @@ Before you can run or deploy the sample, you will need to do the following:
1313

1414
1. Enable the Cloud Pub/Sub API in the [Google Developers Console](https://console.developers.google.com/project/_/apiui/apiview/pubsub/overview).
1515

16-
2. Create a topic and subscription. Your push auth service account must have Service Account Token Creator Role assigned, which can be done in the Cloud Console [IAM & admin](https://console.cloud.google.com/iam-admin/iam) UI. `--push-auth-token-audience` is optional. If set, remember to modify the audience field check in `main.py` (line 88).
16+
1. Allow Cloud Pub/Sub to create authentication tokens in your project.
17+
18+
$ gcloud projects add-iam-policy-binding [your-project-id] \
19+
--member=serviceAccount:service-[your-project-number]@gcp-sa-pubsub.iam.gserviceaccount.com \
20+
--role=roles/iam.serviceAccountTokenCreator
21+
22+
1. Create a topic and subscription. The `--push-auth-service-account` flag activates the Pub/Sub push functionality for Authentication and Authorization. Pub/Sub messages pushed to your endpoint will carry the identity of this service account. You may use an existing service account or create a new one. The `--push-auth-token-audience` flag is optional; if set, remember to modify the audience field check in `main.py`.
1723

1824
$ gcloud pubsub topics create [your-topic-name]
1925
$ gcloud beta pubsub subscriptions create [your-subscription-name] \
2026
--topic=[your-topic-name] \
2127
--push-endpoint=\
2228
https://[your-app-id].appspot.com/_ah/push-handlers/receive_messages?token=[your-token] \
2329
--ack-deadline=30 \
24-
--push-auth-service-account=[your-service-account-email] \
30+
--push-auth-service-account=[your-service-account] \
2531
--push-auth-token-audience=example.com
2632

27-
3. Update the environment variables in ``app.yaml``.
33+
1. Update the environment variables in ``app.yaml``.
2834

2935
## Running locally
3036

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.