Local environment variables (for Development)

Detailed information on the local environment secret store component

This Dapr secret store component uses locally defined environment variable and does not use authentication.

Warning

This approach to secret management is not recommended for production environments.

Component format

To setup local environment variables secret store create a component of type secretstores.local.env. Create a file with the following content in your ./components directory:

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: envvar-secret-store
  5. spec:
  6. type: secretstores.local.env
  7. version: v1
  8. metadata:
  9. # - name: prefix
  10. # value: "MYAPP_"

Spec metadata fields

FieldRequiredDetailsExample
prefixNIf set, limits operations to environment variables with the given prefix. The prefix is removed from the returned secrets’ names.
The matching is case-insensitive on Windows and case-sensitive on all other operating systems.
“MYAPP_”

Notes

For security reasons, this component cannot be used to access these environment variables:

  • APP_API_TOKEN
  • Any variable whose name begins with the DAPR_ prefix