| page_title | dbtcloud_databricks_platform_metadata_credential Resource - dbtcloud |
|---|---|
| subcategory | |
| description | Manages Databricks platform metadata credentials for external metadata ingestion in dbt Cloud. This resource configures credentials that allow dbt Cloud to connect directly to your Databricks workspace to ingest metadata outside of normal dbt project runs. This enables features like: Catalog Ingestion: Ingest metadata about tables/views not defined in dbtCost Optimization: Query warehouse cost and performance dataCost Insights: Enhanced cost visibility and analysis ~> Note: At least one of catalog_ingestion_enabled, cost_optimization_enabled, or cost_insights_enabled must be enabled for the credential to be usable. ~> Note: The connection_id cannot be changed after creation. To use a different connection, you must destroy and recreate the resource. |
Manages Databricks platform metadata credentials for external metadata ingestion in dbt Cloud.
This resource configures credentials that allow dbt Cloud to connect directly to your Databricks workspace to ingest metadata outside of normal dbt project runs. This enables features like:
- Catalog Ingestion: Ingest metadata about tables/views not defined in dbt
- Cost Optimization: Query warehouse cost and performance data
- Cost Insights: Enhanced cost visibility and analysis
~> Note: At least one of catalog_ingestion_enabled, cost_optimization_enabled, or
cost_insights_enabled must be enabled for the credential to be usable.
~> Note: The connection_id cannot be changed after creation. To use a different connection,
you must destroy and recreate the resource.
// Using the classic sensitive attribute (stored in state)
resource "dbtcloud_databricks_platform_metadata_credential" "example" {
connection_id = dbtcloud_global_connection.databricks.id
catalog_ingestion_enabled = true
cost_optimization_enabled = false
cost_insights_enabled = false
token = var.databricks_token
catalog = "main"
}
// Using write-only attributes (not stored in state, requires Terraform >= 1.11)
variable "databricks_metadata_token" {
type = string
ephemeral = true
}
resource "dbtcloud_databricks_platform_metadata_credential" "example_wo" {
connection_id = dbtcloud_global_connection.databricks.id
catalog_ingestion_enabled = true
cost_optimization_enabled = false
cost_insights_enabled = false
token_wo = var.databricks_metadata_token
token_wo_version = 1
catalog = "main"
}catalog(String) The Unity Catalog name to use.connection_id(Number) The ID of the global connection this credential is associated with. Cannot be changed after creation.
catalog_ingestion_enabled(Boolean) Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.cost_insights_enabled(Boolean) Whether cost insights is enabled for this credential.cost_optimization_enabled(Boolean) Whether cost optimization data collection is enabled for this credential.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 Databricks personal access token. 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.
adapter_version(String) The adapter version derived from the connection (e.g., 'snowflake_v0', 'databricks_v0'). This is read-only and determined by the connection.credential_id(Number) The ID of the platform metadata credential.id(String) The unique identifier for this resource (account_id:credential_id).