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.

Azure Blob Storage

Detailed information on the Azure Blob Store state store component

Component format

To setup Azure Blobstorage state store create a component of type See this guide on how to create and apply a state store configuration.

kind: Component
  name: <NAME>
  namespace: <NAMESPACE>
  version: v1
  - name: accountName
  - name: accountKey
  - name: containerName

Spec metadata fields

Field Required Details Example
accountName Y The storage account name "mystorageaccount".
accountKey Y Primary or secondary storage key "key"
containerName Y The name of the container to be used for Dapr state. The container will be created for you if it doesn’t exist "container"

Setup Azure Blobstorage

Follow the instructions from the Azure documentation on how to create an Azure Storage Account.

If you wish to create a container for Dapr to use, you can do so beforehand. However, Blob Storage state provider will create one for you automatically if it doesn’t exist.

In order to setup Azure Blob Storage as a state store, you will need the following properties:

  • AccountName: The storage account name. For example: mystorageaccount.
  • AccountKey: Primary or secondary storage key.
  • ContainerName: The name of the container to be used for Dapr state. The container will be created for you if it doesn’t exist.

Apply the configuration

In Kubernetes

To apply Azure Blob Storage state store to Kubernetes, use the kubectl CLI:

kubectl apply -f azureblob.yaml

Running locally

To run locally, create a components dir containing the YAML file and provide the path to the dapr run command with the flag --components-path.

This state store creates a blob file in the container and puts raw state inside it.

For example, the following operation coming from service called myservice

curl -X POST http://localhost:3500/v1.0/state \
  -H "Content-Type: application/json"
  -d '[
          "key": "nihilus",
          "value": "darth"

creates the blob file in the containter with key as filename and value as the contents of file.


Azure Blob Storage state concurrency is achieved by using ETags according to the Azure Blob Storage documentation.

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