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

GCP Firestore (Datastore mode)

Detailed information on the GCP Firestore state store component

Component format

To setup GCP Firestore state store create a component of type state.gcp.firestore. See this guide on how to create and apply a state store configuration.

kind: Component
  name: <NAME>
  type: state.gcp.firestore
  version: v1
  - name: type
    value: <REPLACE-WITH-CREDENTIALS-TYPE> # Required. Example: "serviceaccount"
  - name: project_id
    value: <REPLACE-WITH-PROJECT-ID> # Required.
  - name: private_key_id
    value: <REPLACE-WITH-PRIVATE-KEY-ID> # Required.
  - name: private_key
    value: <REPLACE-WITH-PRIVATE-KEY> # Required.
  - name: client_email
    value: <REPLACE-WITH-CLIENT-EMAIL> # Required.
  - name: client_id
    value: <REPLACE-WITH-CLIENT-ID> # Required.
  - name: auth_uri
    value: <REPLACE-WITH-AUTH-URI> # Required.
  - name: token_uri
    value: <REPLACE-WITH-TOKEN-URI> # Required.
  - name: auth_provider_x509_cert_url
    value: <REPLACE-WITH-AUTH-X509-CERT-URL> # Required.
  - name: client_x509_cert_url
    value: <REPLACE-WITH-CLIENT-x509-CERT-URL> # Required.
  - name: entity_kind
    value: <REPLACE-WITH-ENTITY-KIND> # Optional. default: "DaprState"
  - name: noindex
    value: <REPLACE-WITH-BOOLEAN> # Optional. default: "false"

Spec metadata fields

Field Required Details Example
type Y The credentials type "serviceaccount"
project_id Y The ID of the GCP project to use "project-id"
private_key_id Y The ID of the prvate key to use "private-key-id"
client_email Y The email address for the client ""
client_id Y The client id value to use for authentication "client-id"
auth_uri Y The authentication URI to use ""
token_uri Y The token URI to query for Auth token ""
auth_provider_x509_cert_url Y The auth provider certificate URL ""
client_x509_cert_url Y The client certificate URL ""
entity_kind N The entity name in Filestore. Defaults to "DaprState" "DaprState"
noindex N Whether to disable indexing of state entities. Use this setting if you encounter Firestore index size limitations. Defaults to "false" "true"

Setup GCP Firestore

You can use the GCP Datastore emulator to run locally using the instructions here.

You can then interact with the server using localhost:8081.

Follow the instructions here to get started with setting up Firestore in Google Cloud.

Last modified February 8, 2023: Firestore noindex option (#3146) (69de6d43)