Destination YAML Reference Beta
- free
- growth
- enterprise
10 minute read
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.
Ifconfigreferences secrets as{{ .VAR }}, pass--var-fileon 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:
| Property | Type | Description |
|---|---|---|
idRequired | String | Unique identifier for the destination within the project. Other specs reference it as #destination:[id]. |
display_nameRequired | String | Name 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. |
typeRequired | String | Destination type. See Supported destination types. Immutable after apply — changing type fails the update. |
definition_versionRequired | Integer | Definition version for type. Set this to 1 — that is the current version for every registered destination. |
enabled | Boolean | Whether 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. |
config | Object | Per-type connection settings. Keys and validation rules come from the destination definition. Unknown envelope fields (siblings of these properties) fail validation. |
transformation | String | Optional URN of a transformation in the same project — #transformation:[transformation.id]. The referenced transformation must exist in the project. |
typeis immutable. To send data to a different destination product, define a new destination resource rather than editingtypeon 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
typeoutside 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
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
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.
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
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.
| Check | When it fails |
|---|---|
| Required envelope fields | id, display_name, type, or definition_version is missing |
display_name format | Value is outside 2–100 characters or uses characters other than letters, digits, underscores, spaces, periods, and hyphens |
Duplicate display_name | Two destinations in the project share the same display_name |
Unknown type | type is not a supported destination type |
Invalid definition_version | Version is not registered for that type |
config shape | Required keys are missing, values are the wrong type, or a value breaks the key’s pattern or allowed-value list |
| Unsupported source-type key | A connection_mode or consent_management entry names a source type the destination does not support |
| Unsupported connection mode | A connection_mode entry sets a mode that source type does not support on this destination |
Missing connection_mode entry | A connected source’s type has no entry in the destination’s connection_mode |
| Transformation reference | transformation 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.
Destination transformation reference must resolve to a project transformation and display_name must be unique across destinations
Rule ID: destination/semantic-valid
Examples
Destination spec envelope, registered type/version, transformation reference format and config must be valid
Rule ID: destination/spec-syntax-valid
Examples
URNs must be unique across the project
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
Rule ID: project/manifest-inline-conflict
Examples
Metadata syntax must be valid
Rule ID: project/metadata-syntax-valid
Examples
See more
- Destination Type Reference for Rudder CLI for the
configkeys each destination type accepts - Manage Destinations using Rudder CLI for feature overview, and the Destinations walkthrough for step-by-step setup
- How to Use Variable Substitution in Rudder CLI for secret
configkeys - Connection YAML Reference to link this destination to a source
- Transformation YAML Reference for the
#transformation:target