Skip to content

Latest commit

 

History

History
100 lines (72 loc) · 3.94 KB

File metadata and controls

100 lines (72 loc) · 3.94 KB
page_title dbtcloud_databricks_semantic_layer_credential Resource - dbtcloud
subcategory
description Databricks credential resource. This resource is composed of a Databricks credential and a Semantic Layer configuration. It is used to create a Databricks credential for the Semantic Layer.

dbtcloud_databricks_semantic_layer_credential (Resource)

Databricks credential resource. This resource is composed of a Databricks credential and a Semantic Layer configuration. It is used to create a Databricks credential for the Semantic Layer.

Example Usage

resource "dbtcloud_databricks_semantic_layer_credential" "sl_cred_databricks_example" {
  configuration = {
    project_id      = var.project_id
    name            = "Databricks SL Credential"
    adapter_version = "databricks_v0"
  }
  credential = {
    project_id                 = var.project_id
    catalog                    = var.catalog 
    token                      = var.token
    semantic_layer_credential  = true
  }
}

Schema

Required

  • configuration (Attributes) Semantic Layer credential configuration details. (see below for nested schema)
  • credential (Attributes) Databricks credential details, but used in the context of the Semantic Layer. (see below for nested schema)

Optional

  • resource_metadata (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.

Read-Only

  • id (Number) The ID of the credential

Nested Schema for configuration

Required:

  • adapter_version (String) The adapter version
  • name (String) The name of the configuration
  • project_id (Number) The ID of the project

Nested Schema for credential

Required:

  • project_id (Number) Project ID to create the Databricks credential in

Optional:

  • adapter_type (String, Deprecated) The type of the adapter. 'spark' is deprecated, but still supported for backwards compatibility. For Spark, please use the spark_credential resource. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
  • catalog (String) The catalog where to create models (only for the databricks adapter)
  • resource_metadata (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
  • schema (String) The schema where to create models. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
  • semantic_layer_credential (Boolean) This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Databricks credential for the Semantic Layer.
  • target_name (String, Deprecated) Target name
  • token (String, Sensitive) Token for Databricks user. 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:

  • credential_id (Number) The system Databricks credential ID
  • id (String) The ID of this resource. Contains the project ID and the credential ID.

Import

Import is supported using the following syntax:

# using import blocks (requires Terraform >= 1.5)
import {
  to = dbtcloud_databricks_semantic_layer_credential.example
  id = "credential_id"
}

import {
  to = dbtcloud_databricks_semantic_layer_credential.example
  id = "12345"
}

# using the older import command
terraform import dbtcloud_databricks_semantic_layer_credential.example "credential_id"
terraform import dbtcloud_databricks_semantic_layer_credential.example 12345