Skip to main content

Google Cloud Pub/Sub

Google Cloud Pub/Sub is a managed messaging service for event-driven architectures.

Configuration

Environment Variables

EVENTS__TYPE=gcp
EVENTS__GCP__PROJECT_ID=my-project
EVENTS__GCP__SUBSCRIPTION_SUFFIX=-sub

YAML Configuration

events:
type: gcp
gcp:
project_id: my-project
subscription_suffix: -sub
VariableDescriptionDefaultRequired
EVENTS__TYPEEvent provider type-
EVENTS__GCP__PROJECT_IDGCP project ID-
EVENTS__GCP__SUBSCRIPTION_SUFFIXSuffix for Pub/Sub subscriptions-sub

Safebucket uses Application Default Credentials (ADC). You can authenticate using any supported method:

  • GOOGLE_APPLICATION_CREDENTIALS environment variable pointing to a service account key file
  • User credentials via gcloud auth application-default login
  • Attached service account (GKE, Cloud Run, Compute Engine)

See the ADC documentation for all supported methods.

Subscription naming

Subscriptions are created using the pattern {topic_name}{suffix}. With the default suffix, a topic named safebucket-notifications gets subscription safebucket-notifications-sub.