Terraform can set ALL_PRIVILEGES and USE_CATALOG on catalogs for 'account users', but not # SELECT or USE_SCHEMA

Andrei_Radulesc
Contributor III

Only the GUI seems to allow SELECT and USE_SCHEMA 'account users' permissions on catalogs. Terraform gives me an error. Here is my Terraform config:

resource "databricks_grants" "staging" {

 provider = databricks.workspace

 catalog = databricks_catalog.staging.name

 grant {

   principal = "account users"

   privileges = ["SELECT", "USE_CATALOG", "USE_SCHEMA"]

 }

}

│ Error: USE_SCHEMA is not allowed on catalog

│  with module.unity_catalog.databricks_grants.staging,

│  on ../../modules/production/unity_catalog/main.tf line 158, in resource "databricks_grants" "staging":

│ 158: resource "databricks_grants" "staging" {

The Terraform man page for databricks_grants says the above should have worked (https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/grants#catalog-grants)