Retrieves a list of view full names in Unity Catalog, that were created by Terraform or manually. Use databricks_tables for retrieving a list of tables.
Granting SELECT
and MODIFY
to sensitive
group on all views in a _things_ databricks_schema from _sandbox_ databricks_catalog.
data "databricks_views" "things" {
catalog_name = "sandbox"
schema_name = "things"
}
resource "databricks_grants" "things" {
for_each = data.databricks_views.things.ids
view = each.value
grant {
principal = "sensitive"
privileges = ["SELECT", "MODIFY"]
}
}
catalog_name
- (Required) Name of databricks_catalogschema_name
- (Required) Name of databricks_schemaThis data source exports the following attributes:
ids
- set of databricks_view full names: catalog
.schema
.view
The following resources are used in the same context: