Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 2.74 KB

File metadata and controls

80 lines (56 loc) · 2.74 KB
subcategory Databricks SQL

databricks_sql_dashboard Resource

!> This resource is deprecated! Please switch to databricks_dashboard to author new AI/BI dashboards using the latest tooling.

This resource is used to manage Legacy dashboards. To manage SQL resources you must have databricks_sql_access on your databricks_group or databricks_user.

-> documentation for this resource is a work in progress.

A dashboard may have one or more widgets.

Example Usage

resource "databricks_directory" "shared_dir" {
  path = "/Shared/Dashboards"
}

resource "databricks_sql_dashboard" "d1" {
  name   = "My Dashboard Name"
  parent = "folders/${databricks_directory.shared_dir.object_id}"

  tags = [
    "some-tag",
    "another-tag",
  ]
}

Example permission to share dashboard with all users:

resource "databricks_permissions" "d1" {
  sql_dashboard_id = databricks_sql_dashboard.d1.id

  access_control {
    group_name       = data.databricks_group.users.display_name
    permission_level = "CAN_RUN"
  }
}

Argument Reference

  • provider_config - (Optional) Configure the provider for management through account provider. This block consists of the following fields:
    • workspace_id - (Required) Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • id - the unique ID of the SQL Dashboard.

Import

You can import a databricks_sql_dashboard resource with ID like the following:

import {
  to = databricks_sql_dashboard.this
  id = "<dashboard-id>"
}

Alternatively, when using terraform version 1.4 or earlier, import using the terraform import command:

terraform import databricks_sql_dashboard.this "<dashboard-id>"

Related Resources

The following resources are often used in the same context: