databrickssqlwidget Resource

June 12, 2026 ยท View on GitHub

API Documentation

!> This resource is deprecated and will be removed in future.

-> Please switch to databricks_dashboard to author new AI/BI dashboards using the latest tooling

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 widget is always tied to a Legacy dashboard. Every dashboard may have one or more widgets.

Example Usage

resource "databricks_sql_widget" "d1w1" {
  dashboard_id = databricks_sql_dashboard.d1.id
  text         = "Hello! I'm a **text widget**!"

  position {
    size_x = 3
    size_y = 4
    pos_x  = 0
    pos_y  = 0
  }
}

resource "databricks_sql_widget" "d1w2" {
  dashboard_id     = databricks_sql_dashboard.d1.id
  visualization_id = databricks_sql_visualization.q1v1.id

  position {
    size_x = 3
    size_y = 4
    pos_x  = 3
    pos_y  = 0
  }
}

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.

Import

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

import {
  to = databricks_sql_widget.this
  id = "<dashboard-id>/<widget-id>"
}

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

terraform import databricks_sql_widget.this <dashboard-id>/<widget-id>

The following resources are often used in the same context: