The documentation you are viewing is for Dapr v1.16 which is an older version of Dapr. For up-to-date documentation, see the latest version.
Alibaba Cloud TableStore
Detailed information on the Alibaba Cloud TableStore state store component for use with Dapr
Component format
To set up an Alibaba Cloud TableStore state store, create a component of type state.alicloud.tablestore.
See this guide on how to create and apply a state store configuration.
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
spec:
type: state.alicloud.tablestore
version: v1
metadata:
- name: endpoint
value: <REPLACE-WITH-ENDPOINT>
- name: instanceName
value: <REPLACE-WITH-INSTANCE-NAME>
- name: tableName
value: <REPLACE-WITH-TABLE-NAME>
- name: accessKeyID
value: <REPLACE-WITH-ACCESS-KEY-ID>
- name: accessKey
value: <REPLACE-WITH-ACCESS-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
| Field | Required | Details | Example |
|---|---|---|---|
endpoint | Y | The endpoint of the Alibaba Cloud TableStore instance | "https://tablestore.aliyuncs.com" |
instanceName | Y | The name of the Alibaba Cloud TableStore instance | "my_instance" |
tableName | Y | The name of the table to use for Dapr state. Will be created if it does not exist | "my_table" |
accessKeyID | Y | The access key ID for authentication | "my_access_key_id" |
accessKey | Y | The access key for authentication | "my_access_key" |
Authentication
Alibaba Cloud TableStore supports authentication using an Access Key and Access Key ID.
You can also use Dapr’s [secret store](https://docs.dapr.io/operations/components/component-secrets/) to securely store these values instead of including them directly in the YAML file.
Example using secret references:
- name: accessKeyID
secretKeyRef:
name: alicloud-secrets
key: accessKeyID
- name: accessKey
secretKeyRef:
name: alicloud-secrets
key: accessKey
Related links
- Basic schema for a Dapr component
- Read this guide for instructions on configuring state store components
- State management building block