Azure Blob Storage

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.

The next step is to create a Dapr component for Azure Blob Storage.

Warning

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

The following example uses the Kubernetes secret store to retrieve the secrets:

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

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

For example, the following operation coming from service called myservice

will create 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 s according to the official documenation.