Skip to content

mtdidexx/PubsubMessageViewer

Repository files navigation

Pubsub Message Viewer

An application that consumes GCP Pubsub messages and writes them to GCP logs.

Deploying to Cloud Run and connecting to a Pubsub Topic

These steps assume that your topic has already been created

Deploy container

gcloud run deploy message-viewer --platform managed --region us-central1 --image gcr.io/gdos-mdonahue-sb/pubsub-message-viewer:Jun17-144917 --no-allow-unauthenticated gcloud run services add-iam-policy-binding --platform managed message-viewer --member=serviceAccount:resultingsync-sa@gdos-mdonahue-sb.iam.gserviceaccount.com --role=roles/run.invoker

Create subscription

gcloud pubsub subscriptions create loggingsubscription --topic=projects/gdos-mdonahue-sb/topics/resultingsync --labels=gdos=pubsub --push-endpoint=https://message-viewer-p62273dhmq-uc.a.run.app/subscription/logMessage --push-auth-service-account resultingsync-sa@gdos-mdonahue-sb.iam.gserviceaccount.com

GCP permissions

  1. Enable Pub/Sub to create authentication tokens in your project:
  2. Create or select a service account to represent the Pub/Sub subscription identity.
  3. Create a Pub/Sub subscription with the service account

GCP Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published