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>
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" |
Alibaba Cloud TableStore supports authentication using an Access Key and Access Key ID.
You can also use Dapr’s [secret store](https://v1-16.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