The documentation you are viewing is for Dapr v1.0 which is an older version of Dapr. For up-to-date documentation, see the latest version.

GCP Pub/Sub

Detailed documentation on the GCP Pub/Sub component

Create a Dapr component

To setup GCP pubsub create a component of type pubsub.gcp.pubsub. See this guide on how to create and apply a pubsub configuration

kind: Component
  name: gcp-pubsub
  namespace: default
  type: pubsub.gcp.pubsub
  version: v1
  - name: type
    value: service_account
  - name: project_id
    value: <PROJECT_ID> # replace
  - name: private_key_id
    value: <PRIVATE_KEY_ID> #replace
  - name: client_email
    value: <CLIENT_EMAIL> #replace
  - name: client_id
    value: <CLIENT_ID> # replace
  - name: auth_uri
  - name: token_uri
  - name: auth_provider_x509_cert_url
  - name: client_x509_cert_url
    value:<PROJECT_NAME> #replace PROJECT_NAME
  - name: private_key
    value: <PRIVATE_KEY> # replace x509 cert  
  - name: disableEntityManagement
    value: "false"

Spec metadata fields

Field Required Details Example
type Y GCP credentials type service_account
project_id Y GCP project id projectId
private_key_id Y GCP private key id "privateKeyId"
private_key Y GCP credentials private key. Replace with x509 cert 12345-12345
client_email Y GCP client email ""
client_id Y GCP client id 0123456789-0123456789
auth_uri Y Google account OAuth endpoint
token_uri Y Google account token uri
auth_provider_x509_cert_url Y GCP credentials cert url
client_x509_cert_url Y GCP credentials project x509 cert url<PROJECT_NAME>
disableEntityManagement N When set to "true", topics and subscriptions do not get created automatically. Default: "false" "true", "false"

Create a GCP Pub/Sub

Follow the instructions here on setting up Google Cloud Pub/Sub system.

Last modified July 8, 2022: update nav bar for v1.0 (#2634) (7fd6223)