Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add Depots & Secrets

Connect the Tenant to external systems with Secrets and Depots.

Before any Data Product workload or Data Product in the Tenant can read or write external data, two resources must exist for each source system:

  • Secret: stores the credentials (username, password, keys) as encrypted key-value pairs. No Data Product workload reads these values directly.

  • Depot: declares the connection endpoint and references the Secret. Data Product workloads reference only the Depot name by its Uniform Data Link (UDL); credentials are injected at runtime.

As Tenant admin you create these, especially the ones holding privileged credentials that standard users should not see. A developer can create their own where they hold the credentials and policy permits, but the shared, sensitive connections are yours to own.

Prerequisites

Before you begin, make sure:

  • The DataOS CLI is installed, configured, and authenticated for the target Tenant.

  • You have Tenant-level permissions to apply Secret and Depot Resources.

  • You have the required source credentials and connection details.

This guide uses a few sources for sanity validation. For additional supported sources and source-specific configuration details, see Secret and Depot in the References.

Steps

1

Create Secret

A Secret manifest carries all the credentials the Depot needs. When you write one, a few fields matter most:

  • name is a unique name within the Tenant. You reference it from the Depot's spec.secrets[].id in the next step, as <tenant>:<secret-name>, so it must match exactly, including case.

  • layer is set to user for Tenant-scoped Secrets. Omitting it causes a validation failure.

  • secret.type is always key-value for data source credentials.

  • secret.data is the map of credential key-value pairs. The keys differ per source type, and BigQuery uses secret.files instead of secret.data. Use the templates below as a guide. All values must be strings, so wrap numeric values in quotes (for example, PORT: "5432").

Replace every <PLACEHOLDER> with your actual values, then save and apply the manifest. You reference the Secret name in the next step.

The templates below cover the most common sources. For all supported Secret types, attribute definitions, and advanced options, see Secret in the References.

PostgreSQL Secret
name: postgres-cred
version: v2alpha
type: secret
layer: user
description: "PostgreSQL read/write credentials"
secret:
  type: key-value
  data:
    username: "<POSTGRES_USERNAME>"
    password: "<POSTGRES_PASSWORD>"
Snowflake Secret
name: snowflake-cred
version: v2alpha
type: secret
layer: user
description: "Credentials for snowflake depot"
secret:
  type: key-value
  data:
    username: "<SNOWFLAKE_USERNAME>"
    password: "<SNOWFLAKE_PASSWORD>"
    role: "<SNOWFLAKE_ROLE>" # optional

The ACCOUNT value is the Snowflake account identifier in <org>-<account> format, for example myorg-myaccount.

AWS S3 Secret
name: s3-cred
version: v2alpha
type: secret
layer: user
description: "Credentials for s3 depot"
secret:
  type: key-value
  data:
    aws_access_key: "<AWS_ACCESS_KEY_ID>"
    aws_secret_key: "<AWS_SECRET_ACCESS_KEY>"

For cross-account access or role assumption, add AWSROLEARN and AWSEXTERNALID under data.

Google Cloud Storage Secret

The gcp_json_key value is the full service account key JSON. Replace literal newlines with \n so the value stays on a single line.

Azure ABFSS Secret

Both values are available in the Access keys blade of the storage account in the Azure portal.

BigQuery Secret

The service account must have the BigQuery Data Viewer and BigQuery Job User roles on the target project.

2

Create Depot

A Depot manifest declares the connection endpoint and references the Secret you created in the previous step. The Secret name in spec.secrets[].id must match the Secret name exactly.

The templates below cover the most common sources. For all supported Depot types, full spec field definitions per source, and additional sources not listed here (MySQL, Redshift, MSSQL, Databricks, and others), see Depot in the References.

PostgreSQL Depot
name: postgresdepot
version: v2alpha
type: depot
layer: user
description: "PostgreSQL connection for tenant"
spec:
  type: postgresql
  spec:
    host: "<POSTGRES_HOST>"
    port: 5432
    database: "<POSTGRES_DATABASE>"
    subprotocol: "postgresql"
  secrets:
    - id: "<TENANT_NAME>:postgres-cred"
      purpose: scan
    - id: "<TENANT_NAME>:postgres-cred"
      purpose: query
    - id: "<TENANT_NAME>:postgres-cred"
      purpose: rw
Snowflake Depot
name: snowflakedepot
version: v2alpha
type: depot
layer: user
description: "Snowflake connection for tenant"
spec:
  type: snowflake
  spec:
    url: "<SNOWFLAKE_ACCOUNT>.snowflakecomputing.com"
    account: "<SNOWFLAKE_ACCOUNT>"
    database: "<DATABASE_NAME>"
    warehouse: "<WAREHOUSE_NAME>"
  secrets:
    - id: "<TENANT_NAME>:snowflake-cred"
      purpose: scan
    - id: "<TENANT_NAME>:snowflake-cred"
      purpose: query
    - id: "<TENANT_NAME>:snowflake-cred"
      purpose: rw
AWS S3 Depot
name: s3depot
version: v2alpha
type: depot
layer: user
description: "AWS S3 connection for tenant"
spec:
  type: s3
  spec:
    bucket: "<S3_BUCKET_NAME>"
    relativePath: "<PATH_INSIDE_BUCKET>"
    scheme: s3a
    format: ICEBERG
    endpoint: "<S3_ENDPOINT>"
  secrets:
    - id: "<TENANT_NAME>:s3-cred"
      purpose: scan
    - id: "<TENANT_NAME>:s3-cred"
      purpose: query
    - id: "<TENANT_NAME>:s3-cred"
      purpose: rw

Omit the rw purpose if the Tenant should only read from this bucket.

Google Cloud Storage Depot
name: gcsdepot
version: v2alpha
type: depot
layer: user
description: "Google Cloud Storage connection for tenant"
spec:
  type: gcs
  spec:
    bucket: "<GCS_BUCKET_NAME>"
    relativePath: "<PATH_INSIDE_BUCKET>"
    format: ICEBERG
    endpoint: "<GCS_ENDPOINT>"
  secrets:
    - id: "<TENANT_NAME>:gcs-cred"
      purpose: scan
    - id: "<TENANT_NAME>:gcs-cred"
      purpose: query
    - id: "<TENANT_NAME>:gcs-cred"
      purpose: rw
Azure ABFSS Depot
name: azuredepot
version: v2alpha
type: depot
layer: user
description: "Azure Data Lake Storage Gen2 connection for tenant"
spec:
  type: abfss
  spec:
    account: "<STORAGE_ACCOUNT_NAME>"
    container: "<CONTAINER_NAME>"
    relativePath: "<PATH_INSIDE_CONTAINER>"
    format: ICEBERG
    endpointSuffix: dfs.core.windows.net
  secrets:
    - id: "<TENANT_NAME>:azure-cred"
      purpose: scan
    - id: "<TENANT_NAME>:azure-cred"
      purpose: query
    - id: "<TENANT_NAME>:azure-cred"
      purpose: rw
BigQuery Depot
3

Apply Resources

Apply the Secret first, then the Depot. DataOS validates the Secret reference at apply time, so the Secret must exist before the Depot is applied.

# PostgreSQL starter bundle (required for sanity validation)
dataos-ctl resource apply -f postgres-cred.yaml
dataos-ctl resource apply -f postgresdepot.yaml

# Snowflake starter bundle (required for sanity validation)
dataos-ctl resource apply -f snowflake-cred.yaml
dataos-ctl resource apply -f snowflakedepot.yaml

For other sources, follow the same pattern:

dataos-ctl resource apply -f <source>-cred.yaml
dataos-ctl resource apply -f <source>depot.yaml

The --disable-interpolation flag is not required for Secret or Depot manifests. Use it only for Stack manifests that contain template placeholders.

4

Verify connections

Confirm each Secret and Depot is active before moving on.

# Check Secrets
dataos-ctl resource get -t secret -n postgres-cred
dataos-ctl resource get -t secret -n snowflake-cred

# Check Depots
dataos-ctl resource get -t depot -n postgresdepot
dataos-ctl resource get -t depot -n snowflakedepot

For a detailed status of any resource:

dataos-ctl resource get -t depot -n <depot-name> -d

Best practices

  • Own the privileged sources. Connections holding production or sensitive credentials should be created and held by you, not scattered across developer-owned Secrets.

  • One Secret, scoped purposes. A Depot can attach a Secret per purpose (rw, scan, query); use scoped credentials where the source supports them.

  • Rotate and re-apply. Rotate credentials on a schedule and re-apply the Secret; nothing downstream needs to change because Data Product workloads reference the Depot, not the Secret.

  • Grant use, do not share. Developers reach a Depot through a Can Use grant, not by holding its credentials. See Manage access.

Once a source is connected, grant the developers who need it Can Use on the Depot. That, and the ApplicationUser mechanics, are in Manage access.

Troubleshooting

Depot apply fails with "secret not found"
  • Confirm the Secret exists: dataos-ctl resource get -t secret -n <secret-name>.

  • Confirm the Secret name in the Depot manifest's spec.secrets[].id matches the Secret name exactly, including case, and that the id is tenant-qualified as <tenant>:<secret-name>.

  • Confirm the Secret and Depot are in the same Tenant.

Secret apply fails with a validation error
  • Check YAML indentation. secret.data key-value pairs must be two levels under secret.

  • Confirm layer: user is present. Omitting this field causes a validation failure.

  • All values under secret.data must be strings. Wrap numeric values in quotes.

Depot is active but Data Product workloads cannot reach the source
  • Confirm the source endpoint is reachable from the Tenant Data Plane network (VPC/VNet peering, firewall rules).

  • For Snowflake, confirm the url uses the full account identifier, for example myorg-myaccount.snowflakecomputing.com.

  • For S3, confirm the IAM policy attached to the access key allows s3:GetObject, s3:PutObject, and s3:ListBucket on the target bucket.

  • For GCS and BigQuery, confirm the service account has the correct IAM roles on the project or dataset.

  • For Azure ABFSS, confirm the storage account key is current. Azure rotates keys periodically and an expired key causes connection failures.

Depot status shows "pending" after apply
  • DataOS validates the Depot connection at apply time. Pending means the connection check has not finished.

  • Run dataos-ctl resource get -t depot -n <name> -d and inspect the status.message field for the failure reason.

  • Re-apply after fixing the credentials or endpoint.

Need to update credentials after rotation
  • Update the Secret manifest with the new credential values and re-apply:

  • The Depot does not need to be re-applied. It reads credentials from the Secret at runtime.

Last updated

Was this helpful?