GCP Pub/Sub binding spec

Detailed documentation on the GCP Pub/Sub binding component

Setup Dapr component

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. namespace: <NAMESPACE>
  6. spec:
  7. type: bindings.gcp.pubsub
  8. version: v1
  9. metadata:
  10. - name: topic
  11. value: topic1
  12. - name: subscription
  13. value: subscription1
  14. - name: type
  15. value: service_account
  16. - name: project_id
  17. value: project_111
  18. - name: private_key_id
  19. value: *************
  20. - name: client_email
  21. value: name@domain.com
  22. - name: client_id
  23. value: '1111111111111111'
  24. - name: auth_uri
  25. value: https://accounts.google.com/o/oauth2/auth
  26. - name: token_uri
  27. value: https://oauth2.googleapis.com/token
  28. - name: auth_provider_x509_cert_url
  29. value: https://www.googleapis.com/oauth2/v1/certs
  30. - name: client_x509_cert_url
  31. value: https://www.googleapis.com/robot/v1/metadata/x509/<project-name>.iam.gserviceaccount.com
  32. - name: private_key
  33. value: PRIVATE KEY
  • topic is the Pub/Sub topic name.
  • subscription is the Pub/Sub subscription name.
  • type is the GCP credentials type.
  • project_id is the GCP project id.
  • private_key_id is the GCP private key id.
  • client_email is the GCP client email.
  • client_id is the GCP client id.
  • auth_uri is Google account OAuth endpoint.
  • token_uri is Google account token uri.
  • auth_provider_x509_cert_url is the GCP credentials cert url.
  • client_x509_cert_url is the GCP credentials project x509 cert url.
  • private_key is the GCP credentials private key.

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

Output Binding Supported Operations

  • create

Related links

Last modified February 16, 2021: Merge pull request #1235 from dapr/update-v0.11 (b4e9fbb)