Skip to main content

diagrid configuration create

Create a Dapr configuration

Description

Create a new Dapr configuration resource in a project.

To replace an existing configuration policy in place, use 'diagrid apply -f' — the canonical upsert path that works for every resource kind.

diagrid configuration create <configuration> [flags]

Examples


# Create a configuration with access control
diagrid configuration create my-config --project my-project --default-action deny --policy app1:allow --policy app2:deny

# Create a configuration with default action
diagrid configuration create my-config --project my-project --default-action allow

# Create a configuration that enables tracing to an OpenTelemetry collector
diagrid configuration create my-config --project my-project --tracing-sampling-rate 1 --tracing-otel-endpoint otel-collector:4317 --tracing-otel-protocol grpc

# Create a configuration that sends an auth header to an OpenTelemetry collector
diagrid configuration create my-config --project my-project --tracing-otel-endpoint otel-collector:4317 --tracing-otel-secure --tracing-otel-header 'Authorization:Bearer <token>'

# Create a configuration with workflow state retention
diagrid configuration create my-config --project my-project --workflow-retention-completed 1h --workflow-retention-failed 24h

# Create a configuration with an HTTP middleware pipeline
diagrid configuration create my-config --project my-project --http-pipeline-handler ratelimit:middleware.http.ratelimit

# Create a configuration from a YAML manifest
diagrid configuration create my-config --project my-project --file my-config.yaml

# To replace an existing configuration in place, use 'diagrid apply':
diagrid apply --project my-project -f my-config.yaml

Options

-p, --project string Name of existing project
--default-action string Default access control action (allow or deny)
--policy stringArray Access control policies in format 'appId:action' (e.g. --policy app1:allow --policy app2:deny)
--tracing-sampling-rate string Tracing sampling rate, e.g. '1' (all) or '0.5'
--tracing-otel-endpoint string OpenTelemetry collector endpoint address (host:port)
--tracing-otel-protocol string OpenTelemetry export protocol (grpc or http)
--tracing-otel-secure Use a secure (TLS) connection to the OpenTelemetry endpoint
--tracing-otel-header stringArray Header added to every OTLP exporter request in format 'name:value', e.g. --tracing-otel-header 'Authorization:Bearer <token>' (repeatable; value may contain ':')
--workflow-max-concurrent-workflows int32 Max concurrent workflow invocations per Dapr instance (honored in private regions only)
--workflow-max-concurrent-activities int32 Max concurrent activity invocations per Dapr instance (honored in private regions only)
--workflow-retention-completed string TTL before purging Completed workflow instances, e.g. '1h', '30m'
--workflow-retention-failed string TTL before purging Failed workflow instances, e.g. '24h'
--workflow-retention-terminated string TTL before purging Terminated workflow instances
--workflow-retention-any-terminal string TTL before purging workflow instances in any terminal state
--http-pipeline-handler stringArray Inbound HTTP middleware handler in format 'name:type' (repeatable, order significant)
--app-http-pipeline-handler stringArray App-channel HTTP middleware handler in format 'name:type' (repeatable, order significant)
-f, --file string Path to a YAML manifest describing the Configuration. Mutually exclusive with the inline spec flags.
-w, --wait Wait for long-running resource creation to finish
-h, --help help for create

Options inherited from parent commands

--api-key string Diagrid Cloud API key

SEE ALSO