Skip to main content
Jedify reads your dbt project from dbt Cloud’s Discovery API: the models your production environment’s runs built. It signs in with a service token that can only read that metadata, kept in your secret manager.

Before you start

  • A dbt plan with the Discovery API: Starter, Enterprise or Enterprise+.
  • A dbt account admin, to create the token.
  • A production environment with at least one successful job run. Jedify reads the models those runs built. With no run, the source still connects, but there is nothing to read.

1. Create a read-only token

A dbt account admin creates it under Account settings > Service tokens: Metadata Only reads models, runs, sources and tests through the Discovery API, and can change nothing. It can’t call dbt’s Admin API, which Jedify doesn’t use.
dbt’s documentation disagrees on whether Starter plans offer Metadata Only tokens. Connecting with one worked on a Starter trial account.

2. Collect the four values

For example, the environment at https://ab123.us1.dbt.com/deploy/1234/projects/70001/environments/80002 has project_id 70001 and environment_id 80002, and that account’s discovery_api_url is https://ab123.metadata.us1.dbt.com/graphql.
discovery_api_url must end in /graphql. dbt’s Access URLs page shows it without (https://ab123.metadata.us1.dbt.com), and Jedify sends its queries to the URL exactly as written. Without /graphql, dbt answers HTTP 404.

Check them

Whoever stores the secret checks the four values first, on a workstation with curl, jq and gcloud:

3. Store them in Secret Manager

In the same shell, store the four values as one JSON secret in your installation’s project. The token goes straight into Secret Manager, never into a file:

4. Let the cluster reach dbt

Jedify calls the host of your discovery_api_url on port 443, from the cluster.
  • In a network OpenTofu created, its Cloud NAT lets the call out. There is nothing to do.
  • In your own network, your network team allows the host out, next to your warehouses’ hosts. The preflight checks it from the install host: add --egress ab123.metadata.us1.dbt.com to the command in Requirements.

If dbt restricts IP addresses

dbt Enterprise+ accounts can refuse every call from an address that isn’t on their list, service tokens included. dbt then answers HTTP 403 with Forbidden: Access denied, and the source fails to connect. A dbt account admin adds the addresses Jedify’s calls leave from. In your own network, your network team has them: your NAT’s or firewall’s. In a network OpenTofu created, they are its Cloud NAT’s:
Google picks the addresses of the Cloud NAT that OpenTofu creates, and adds or removes them as traffic needs. You can’t know the next one in advance, so an allowlist of today’s addresses can break later. Where dbt restricts IP addresses, install into a network whose traffic leaves from addresses you reserved: see Install into an existing network.

5. Declare the source

Add it to your Jedify resource and apply:
The operator reads the secret through the installation’s own store, from its own project. For a secret in another project or another secret manager, see Credentials. A Kubernetes Secret in the jedify-be namespace works too: credentials: { name: dbt-cloud, key: credentials.json }.

6. Check it

Expected: dbt-cloud Connected pipeline. pipeline is how Jedify classes dbt Cloud: a source that is not a warehouse.

When it fails

The connect’s log, when it says Failed to connect:
A line with argument of type 'NoneType' means dbt returned no data for the environment: the token is wrong, it isn’t scoped to the environment’s project, or the environment ID is wrong. Any other line carries dbt’s own answer, or the network error.

Rotate the token

  1. A dbt account admin creates a new token, as in step 1.
  2. Run the check with the new token, then step 3 with gcloud secrets versions add dbt-cloud-credentials in place of gcloud secrets create dbt-cloud-credentials.
  3. External Secrets reads the secret again within the hour, and the operator connects the source with the new token. An hour later, with the source still Connected, delete the old token in dbt.