gcp_pubsub
How to get these credentialsGoogle Cloud Pub/Sub connection: project, credentials (service account key JSON or OAuth access token) and optional endpoint overrides (emulator).
CREATE SECRET gcp_pubsub (
TYPE gcp_pubsub,
project_id '<project_id>',
service_account_json '<GCP_PUBSUB_SERVICE_ACCOUNT_JSON>', -- secret
access_token '<ACCESS_TOKEN>', -- secret
endpoint '<endpoint>',
monitoring_endpoint '<monitoring_endpoint>',
quota_project_id '<quota_project_id>'
);
| Key | Type | Required | Description |
|---|---|---|---|
| project_id | VARCHAR | — | Default Google Cloud project id, e.g. 'my-project'. Functions take project := to override it. |
| service_account_json secret | VARCHAR | — | Service account key file contents (JSON). The worker signs a JWT and exchanges it at the key's token_uri for an access token. |
| access_token secret | VARCHAR | — | OAuth 2.0 access token (e.g. from `gcloud auth print-access-token`), sent as a bearer token. Expires after about an hour. |
| endpoint | VARCHAR | — | Pub/Sub API root. Default https://pubsub.googleapis.com. For the emulator give its host:port (the PUBSUB_EMULATOR_HOST value) or http://host:port; no credentials are sent unless the secret has them. |
| monitoring_endpoint | VARCHAR | — | Cloud Monitoring API root for time_series and subscription_backlog. Default https://monitoring.googleapis.com. |
| quota_project_id | VARCHAR | — | Project billed for API quota, sent as x-goog-user-project (needed by some user credentials). |
The worker doesn't mark which keys are required.
Needed by access_checkiam_policiesread_messagesschema_revisionsschemassnapshotssubscription_backlogsubscriptionstime_seriestopics