Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.87 KB

File metadata and controls

50 lines (33 loc) · 1.87 KB
subcategory
Unity Catalog

databricks_tables Data Source

-> Note This data source could be only used with workspace-level provider!

-> Note If you have a fully automated setup with workspaces created by databricks_mws_workspaces or azurerm_databricks_workspace, please make sure to add depends_on attribute in order to prevent default auth: cannot configure default credentials errors.

Retrieves a list of managed or external table full names in Unity Catalog, that were created by Terraform or manually. Use databricks_views for retrieving a list of views.

Example Usage

Granting SELECT and MODIFY to sensitive group on all tables a things databricks_schema from sandbox databricks_catalog:

data "databricks_tables" "things" {
  catalog_name = "sandbox"
  schema_name  = "things"
}

resource "databricks_grants" "things" {
  for_each = data.databricks_tables.things.ids

  table = each.value

  grant {
    principal  = "sensitive"
    privileges = ["SELECT", "MODIFY"]
  }
}

Argument Reference

Attribute Reference

This data source exports the following attributes:

  • ids - set of databricks_table full names: catalog.schema.table

Related Resources

The following resources are used in the same context: