GCP Pub/Sub binding spec

Detailed documentation on the GCP Pub/Sub binding component

Component format

To setup Azure Pub/Sub binding create a component of type bindings.gcp.pubsub. See this guide on how to create and apply a binding configuration.

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
  namespace: <NAMESPACE>
spec:
  type: bindings.gcp.pubsub
  version: v1
  metadata:
  - name: topic
    value: topic1
  - name: subscription
    value: subscription1
  - name: type
    value: service_account
  - name: project_id
    value: project_111
  - name: private_key_id
    value: *************
  - name: client_email
    value: name@domain.com
  - name: client_id
    value: '1111111111111111'
  - name: auth_uri
    value: https://accounts.google.com/o/oauth2/auth
  - name: token_uri
    value: https://oauth2.googleapis.com/token
  - name: auth_provider_x509_cert_url
    value: https://www.googleapis.com/oauth2/v1/certs
  - name: client_x509_cert_url
    value: https://www.googleapis.com/robot/v1/metadata/x509/<project-name>.iam.gserviceaccount.com
  - name: private_key
    value: PRIVATE KEY

Spec metadata fields

FieldRequiredBinding supportDetailsExample
topicYOutputGCP Pub/Sub topic name"topic1"
subscriptionYGCP Pub/Sub subscription name"name1"
typeYOutputGCP credentials typeservice_account
project_idYOutputGCP project idprojectId
private_key_idYOutputGCP private key id"privateKeyId"
private_keyYOutputGCP credentials private key. Replace with x509 cert12345-12345
client_emailYOutputGCP client email"client@email.com"
client_idYOutputGCP client id0123456789-0123456789
auth_uriYOutputGoogle account OAuth endpointhttps://accounts.google.com/o/oauth2/auth
token_uriYOutputGoogle account token urihttps://oauth2.googleapis.com/token
auth_provider_x509_cert_urlYOutputGCP credentials cert urlhttps://www.googleapis.com/oauth2/v1/certs
client_x509_cert_urlYOutputGCP credentials project x509 cert urlhttps://www.googleapis.com/robot/v1/metadata/x509/<PROJECT_NAME>.iam.gserviceaccount.com

Binding support

This component supports output binding with the following operations:

  • create