Dapr - Secret Management
building block
var secret = await _daprClient.GetSecretAsync(
SecretStoreName,
key);
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: secretstore
namespace: default
spec:
type: secretstores.local.file
version: v1
metadata:
- name: secretsFile
value: ./SecretStore/secrets.json
- name: nestedSeparator
value: ":"
Create local-secret-store.yaml
files in some location, with content as above. Use this location as components directory in tye configuration
Note: When using
tye
for orchestration,tye
can only access configuration files that are at same or subdirectory level, wheretye.yaml
is present. If you try accessing parent directory, it won't work.