Select spec version:

Destination YAML Reference Beta

Complete reference for defining destinations using YAML configuration files.
Available Plans
  • free
  • growth
  • enterprise

This guide is the YAML reference for destination resources in a Rudder CLI project.

Destination support requires Rudder CLI v0.25.0 or later.

Upgrade if you are using an earlier version.

Overview

Set kind to destination. Each file defines one destination. You can store the file anywhere under the project root — Rudder CLI scans the directory recursively.

If config references secrets as {{ .VAR }}, pass --var-file on apply. See How to Use Variable Substitution in Rudder CLI.

Local YAML uses snake_case config keys. Rudder CLI converts them to the API’s camelCase at apply time. Do not put camelCase keys in the spec.

Destination resources

The spec object has the following structure:

PropertyType
Description
id
Required
StringUnique identifier for the destination within the project. Other specs reference it as #destination:[id].
display_name
Required
StringName shown in the RudderStack dashboard. Must be 2–100 characters and contain only letters, digits, underscores, spaces, periods, and hyphens. Must be unique across destinations in the project.
type
Required
StringDestination type. See Supported destination types. Immutable after apply — changing type fails the update.
definition_version
Required
IntegerDefinition version for type. Set this to 1 — that is the current version for every registered destination.
enabledBooleanWhether the destination is enabled. If you omit this field, Rudder CLI creates the destination as disabled. Set enabled: true to deliver events after you connect a source.
configObjectPer-type connection settings. Keys and validation rules come from the destination definition. Unknown envelope fields (siblings of these properties) fail validation.
transformationStringOptional URN of a transformation in the same project — #transformation:[transformation.id]. The referenced transformation must exist in the project.
type is immutable. To send data to a different destination product, define a new destination resource rather than editing type on an existing one.

Supported destination types

Rudder CLI supports 24 destination types. Every one takes definition_version: 1, and each has its own set of config keys.

See Destination Type Reference for Rudder CLI for the full list of type values, the config keys each type accepts, and the rules shared across all of them — source types, connection modes, consent_management, and secrets.

Important considerations

  • Rudder CLI rejects any type outside this table. You can define more destinations in the RudderStack dashboard than what you can define in Rudder CLI.
  • To start from a destination you already configured in the dashboard, run rudder-cli import workspace — the imported YAML uses the same keys these pages document. See How to Import Workspace Resources for more information.

Config keys

config keys are specific to the destination type. Unknown keys fail validation with unknown config field "<key>".

Two keys are accepted by every type:

  • connection_mode — maps each source type you connect to the mode its events reach the destination in. This lives on the destination spec, not on the connection spec.
  • consent_management — consent provider configuration per source type.

Both are objects keyed by local source type, and a key naming a source type the destination doesn’t support fails validation. See Connection modes and Consent management.

For everything else, see the type’s own page — for example Amazon S3 Destination Config Reference or BigQuery Destination Config Reference.

Examples

Amazon S3 with IAM role authentication

yaml
version: rudder/v1
kind: destination
metadata:
  name: amazon-s3-prod
spec:
  id: amazon-s3-prod
  display_name: "Amazon S3 Production"
  type: s3
  definition_version: 1
  enabled: true
  config:
    bucket_name: "rudder-events-prod"
    prefix: "rudder/events"
    role_based_auth: true
    iam_role_arn: "arn:aws:iam::<AWS_ACCOUNT_ID>:role/<ROLE_NAME>"

Amazon S3 with access keys

yaml
version: rudder/v1
kind: destination
metadata:
  name: amazon-s3-prod
spec:
  id: amazon-s3-prod
  display_name: "Amazon S3 Production"
  type: s3
  definition_version: 1
  enabled: true
  config:
    bucket_name: "rudder-events-prod"
    role_based_auth: false
    access_key_id: "{{ .AWS_ACCESS_KEY_ID }}"
    access_key: "{{ .AWS_SECRET_ACCESS_KEY }}"

Destination with a transformation

The transformation must exist in the same project. Rudder CLI creates or updates the destination, then links the transformation.

yaml
version: rudder/v1
kind: destination
metadata:
  name: amazon-s3-prod
spec:
  id: amazon-s3-prod
  display_name: "Amazon S3 Production"
  type: s3
  definition_version: 1
  enabled: true
  transformation: "#transformation:enrich-events"
  config:
    bucket_name: "rudder-events-prod"
    role_based_auth: true
    iam_role_arn: "arn:aws:iam::<AWS_ACCOUNT_ID>:role/<ROLE_NAME>"

Secret handling

Secret config keys (for example S3 access_key and access_key_id) must be {{ .VARIABLE_NAME }} references, not literals.

See How to Use Variable Substitution in Rudder CLI.

Import existing destinations

bash
rudder-cli import workspace -l <project-directory>

Rudder CLI writes one file per destination under imported/destinations/<id>.yaml, converts config to snake_case, and records import metadata. Use import to bring destinations you created in the dashboard under CLI management.

Secret keys it receives are written as {{ .VAR }} placeholders rather than values, and the imported YAML may or may not include every secret key. Before you apply, make sure each one your configuration needs is present and populated through variable substitution. See Fill placeholders after import.

See How to Import Workspace Resources for the full import workflow.

Validation rules

rudder-cli validate checks destination specs before apply. Failures block apply.

CheckWhen it fails
Required envelope fieldsid, display_name, type, or definition_version is missing
display_name formatValue is outside 2–100 characters or uses characters other than letters, digits, underscores, spaces, periods, and hyphens
Duplicate display_nameTwo destinations in the project share the same display_name
Unknown typetype is not a supported destination type
Invalid definition_versionVersion is not registered for that type
config shapeRequired keys are missing, values are the wrong type, or a value breaks the key’s pattern or allowed-value list
Unsupported source-type keyA connection_mode or consent_management entry names a source type the destination does not support
Unsupported connection modeA connection_mode entry sets a mode that source type does not support on this destination
Missing connection_mode entryA connected source’s type has no entry in the destination’s connection_mode
Transformation referencetransformation is not #transformation:[id], or that transformation is not in the project

Plan limits, OAuth token state, and live warehouse connectivity are not checked locally. The server returns those errors on apply.

The rule catalog below lists every rule with valid and invalid examples.

Spec version
Filter by phase

Showing 5 of 5 rules

Destination transformation reference must resolve to a project transformation and display_name must be unique across destinations

semantic error

Rule ID: destination/semantic-valid

Examples

Destination spec envelope, registered type/version, transformation reference format and config must be valid

syntactic error

Rule ID: destination/spec-syntax-valid

Examples

URNs must be unique across the project

syntactic error

Rule ID: project/duplicate-urn

Examples

A (workspace_id, urn) must not be defined in both an import-manifest and inline metadata.import with differing remote_ids

syntactic error

Rule ID: project/manifest-inline-conflict

Examples

Metadata syntax must be valid

syntactic error

Rule ID: project/metadata-syntax-valid

Examples

See more

Questions? Let's figure it out together.

Join the RudderStack Slack community to connect with other users, customers, and the RudderStack team — or reach out for direct support.