Skip to content

Grant

laktory.models.resources.databricks.Grant ¤

Bases: GrantBase

Databricks Grant

Non-destructive per-principal grant. Updates privileges for a single principal without affecting any other principals' grants on the same securable.

Use this standalone resource when you need to manage grants on a securable that Laktory does not create (e.g., a pre-existing catalog or an externally managed table). For resources that Laktory creates, prefer the embedded grant field on the resource itself (e.g., Catalog.grant, Schema.grant) — it generates the same Terraform resource but keeps the grant definition co-located with the resource.

Examples:

import io

from laktory import models

grant_yaml = '''
catalog: dev
principal: metastore-admins
privileges:
- CREATE_SCHEMA
'''
grant = models.resources.databricks.Grant.model_validate_yaml(
    io.StringIO(grant_yaml)
)
References
BASE DESCRIPTION
catalog

TYPE: str | None | VariableType DEFAULT: None

credential

TYPE: str | None | VariableType DEFAULT: None

external_location

TYPE: str | None | VariableType DEFAULT: None

foreign_connection

TYPE: str | None | VariableType DEFAULT: None

function

TYPE: str | None | VariableType DEFAULT: None

metastore

TYPE: str | None | VariableType DEFAULT: None

model

TYPE: str | None | VariableType DEFAULT: None

pipeline

TYPE: str | None | VariableType DEFAULT: None

principal

TYPE: str | VariableType

privileges

TYPE: list[str] | VariableType

recipient

TYPE: str | None | VariableType DEFAULT: None

schema_

TYPE: str | None | VariableType DEFAULT: None

share

TYPE: str | None | VariableType DEFAULT: None

storage_credential

TYPE: str | None | VariableType DEFAULT: None

table

TYPE: str | None | VariableType DEFAULT: None

volume

TYPE: str | None | VariableType DEFAULT: None