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.

  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

Warning

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

Spec metadata fields

FieldRequiredBinding supportDetailsExample
topicYOutputGCP Pub/Sub topic name“topic1”
subscriptionNGCP Pub/Sub subscription name“name1”
typeYOutputGCP credentials typeservice_account
project_idYOutputGCP project idprojectId
private_key_idNOutputGCP private key id“privateKeyId”
private_keyYOutputGCP credentials private key. Replace with x509 cert12345-12345
client_emailYOutputGCP client email“client@email.com”
client_idNOutputGCP client id0123456789-0123456789
auth_uriNOutputGoogle account OAuth endpointhttps://accounts.google.com/o/oauth2/auth
token_uriNOutputGoogle account token urihttps://oauth2.googleapis.com/token
auth_provider_x509_cert_urlNOutputGCP credentials cert urlhttps://www.googleapis.com/oauth2/v1/certs
client_x509_cert_urlNOutputGCP 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

Last modified August 2, 2021 : Fix Java SDK link (#1695) (2c67fd1)