Skip to content

Latest commit

 

History

History
96 lines (73 loc) · 3.47 KB

File metadata and controls

96 lines (73 loc) · 3.47 KB
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.

dbtcloud_lineage_integration (Resource)

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.

Example Usage

// 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]
}

Schema

Required

  • host (String) The URL of the BI server (see docs for more details)
  • project_id (Number) The dbt Cloud project ID for the integration
  • site_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

Optional

  • 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 using token_wo instead, which is not stored in state.
  • token_wo (String) Write-only alternative to token. The value is not stored in state. Requires token_wo_version to trigger updates.
  • token_wo_version (Number) Version number for token_wo. Increment this value to trigger an update of the token when using token_wo.

Read-Only

  • id (String) Combination of project_id and lineage_integration_id
  • lineage_integration_id (Number) The ID of the lineage integration
  • name (String) The integration type. Today only 'tableau' is supported

Import

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