| page_title | dbtcloud_lineage_integration Resource - dbtcloud |
|---|---|
| subcategory | |
| description | Setup lineage integration for dbt Cloud to automatically fetch lineage from external BI tools in dbt Explorer. Currently supports Tableau. This resource requires having an environment tagged as production already created for you project. |
Setup lineage integration for dbt Cloud to automatically fetch lineage from external BI tools in dbt Explorer. Currently supports Tableau.
This resource requires having an environment tagged as production already created for you project.
// the resource can only be configured when a Prod environment has been set
// so, you might want to explicitly set the dependency on your Prod environment resource
// Using the classic sensitive attribute (stored in state)
resource "dbtcloud_lineage_integration" "my_lineage" {
project_id = dbtcloud_project.my_project.id
host = "my.host.com"
site_id = "mysiteid"
token_name = "my-token-name"
token = "my-sensitive-token"
depends_on = [dbtcloud_environment.my_prod_env]
}
// Using write-only attributes (not stored in state, requires Terraform >= 1.11)
//
// The token_wo value is never persisted in the Terraform state file.
// Use token_wo_version to trigger an update when the token changes.
variable "lineage_token" {
type = string
ephemeral = true
}
resource "dbtcloud_lineage_integration" "my_lineage_wo" {
project_id = dbtcloud_project.my_project.id
host = "my.host.com"
site_id = "mysiteid"
token_name = "my-token-name"
token_wo = var.lineage_token
token_wo_version = 1
depends_on = [dbtcloud_environment.my_prod_env]
}host(String) The URL of the BI server (see docs for more details)project_id(Number) The dbt Cloud project ID for the integrationsite_id(String) The sitename for the collections of dashboards (see docs for more details)token_name(String) The token to use to authenticate to the BI server
resource_metadata(Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.token(String, Sensitive) The secret token value to use to authenticate to the BI server. Consider usingtoken_woinstead, which is not stored in state.token_wo(String) Write-only alternative totoken. The value is not stored in state. Requirestoken_wo_versionto trigger updates.token_wo_version(Number) Version number fortoken_wo. Increment this value to trigger an update of the token when usingtoken_wo.
id(String) Combination ofproject_idandlineage_integration_idlineage_integration_id(Number) The ID of the lineage integrationname(String) The integration type. Today only 'tableau' is supported
Import is supported using the following syntax:
# using import blocks (requires Terraform >= 1.5)
import {
to = dbtcloud_lineage_integration.my_lineage_integration
id = "projet_id:lineage_integration_id"
}
import {
to = dbtcloud_lineage_integration.my_lineage_integration
id = "123:4567"
}
# using the older import command
terraform import dbtcloud_lineage_integration.my_lineage_integration "projet_id:lineage_integration_id"
terraform import dbtcloud_lineage_integration.my_lineage_integration 123:4567