databricks_tables Data Source

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:

The following resources are used in the same context: