-
Notifications
You must be signed in to change notification settings - Fork 0
GCP PubSub
udx-github edited this page Jul 26, 2026
·
1 revision
Creates a Pub/Sub topic with push and pull subscriptions.
Use this module when a Rabbit service needs asynchronous messaging - queueing work for Cloud Run services, fanning out events, or buffering bursts with retry and dead-letter policies.
- One topic per module instance with optional labels and retention.
- Push subscriptions with OIDC-authenticated delivery to Cloud Run.
- Pull subscriptions for polling consumers.
- Per-subscription ack deadline, retry policy, dead-letter policy, and expiration TTL.
- GCP credentials with permission to manage Pub/Sub (
roles/pubsub.admin). - The
pubsub.googleapis.comAPI enabled on the project (enabled automatically viagoogle_api_name). - For OIDC push to Cloud Run: the
oidc_service_accountmust holdroles/run.invokeron the target service (see thegcp-cloud-runmodule'sinvokers).
- A subscription is push when
push_endpointis set, pull otherwise. -
dead_letter.topicreferences an existing topic by name in the same project; this module does not create the DLQ topic. The Pub/Sub service agent needs publish rights on the DLQ topic and subscribe rights on the subscription. - Deleted subscription names cannot be reused immediately; prefer stable names.
-
expiration_ttlremoves idle subscriptions; omit it for durable subscriptions.
services:
- name: "Eventing"
module: "gcp-pubsub"
id: "my-queue"
configurations:
topic_name: "my-topic"
subscriptions:
- name: "worker-sub"
push_endpoint: "https://my-worker-123.us-central1.run.app"
oidc_service_account: "sa-invoker@my-project.iam.gserviceaccount.com"
ack_deadline: 60| Output | Description |
|---|---|
topic_id |
Fully-qualified topic ID. |
topic_name |
Topic name. |
subscription_names |
Map of subscription keys to subscription names. |
configurations:
topic_name: "" # Required. Topic name, unique per project.
labels: {} # Optional. Labels applied to the topic.
message_retention_duration: "" # Optional. e.g. "86400s". Omit for default.
subscriptions: # Optional. List of subscriptions on the topic.
- name: "" # Required. Subscription name, unique per project.
push_endpoint: "" # Optional. HTTPS endpoint; presence makes this a push subscription.
oidc_service_account: "" # Optional. SA email used to mint OIDC tokens for push delivery.
ack_deadline: 10 # Optional. Seconds (10-600).
labels: {} # Optional. Labels applied to the subscription.
message_retention_duration: "" # Optional. e.g. "604800s".
retain_acked_messages: false # Optional.
retry_policy: # Optional. Exponential backoff between delivery attempts.
minimum_backoff: "10s"
maximum_backoff: "600s"
dead_letter: # Optional. Existing topic to route failed deliveries to.
topic: "" # Topic name in the same project.
max_delivery_attempts: 5 # 5-100.
expiration_ttl: "" # Optional. e.g. "2678400s". Omit for a never-expiring subscription.- AWS ACM Certificate
- AWS CloudFormation Stack
- AWS CloudFront Distribution
- AWS CloudFront Response Headers Policy
- AWS Route53 DNS
- AWS WAF
- GCP Cloud Run
- GCP Firestore Database (
gcp-firestore) - GCP GKE Cluster
- GCP GKE Node Pool
- GCP IAM
- GCP Monitoring
- GCP Networking
- GCP PostgreSQL Instance
- GCP Pub/Sub
- GCP Secret Manager
- GCP Service Account
- GCP SQL Instance
- GCP Static IP
- GCP Storage
- Ghost Inspector Sync
- K8s Access
- K8s ConfigMap
- K8s Deployment
- K8s HPA
- K8s HTTP Gateway Route
- K8s HTTP Health Check Policy
- K8s Memcached
- K8s Namespace
- K8s PDB
- K8s Secret
- K8s Service
- K8s Shared HTTP Gateway
- NewRelic APM Browser
- NewRelic Synthetic Monitors