Grants
laktory.models.resources.databricks.Grants
¤
Bases: GrantsBase
Databricks Grants
Full grant replacement. Sets the complete list of grants for a securable and removes every existing grant not listed here - including those set outside Laktory.
Use this standalone resource when you need authoritative grant management on a securable that
Laktory does not create. For resources that Laktory creates, prefer the embedded grants field
on the resource itself (e.g., Catalog.grants, Schema.grants) - it generates the same
Terraform resource but keeps the grant definition co-located with the resource.
Warning: because this resource replaces all grants, any access granted through the Databricks UI or another tool will be removed on the next Terraform apply.
Examples:
import io
from laktory import models
grants_yaml = '''
catalog: dev
grants:
- principal: metastore-admins
privileges:
- CREATE_SCHEMA
- principal: account users
privileges:
- USE_CATALOG
- USE_SCHEMA
'''
grants = models.resources.databricks.Grants.model_validate_yaml(
io.StringIO(grants_yaml)
)
References
| BASE | DESCRIPTION |
|---|---|
catalog
|
TYPE:
|
credential
|
TYPE:
|
external_location
|
TYPE:
|
foreign_connection
|
TYPE:
|
function
|
TYPE:
|
grant
|
TYPE:
|
metastore
|
TYPE:
|
model
|
TYPE:
|
pipeline
|
TYPE:
|
recipient
|
TYPE:
|
schema_
|
TYPE:
|
share
|
TYPE:
|
storage_credential
|
TYPE:
|
table
|
TYPE:
|
volume
|
TYPE:
|
laktory.models.resources.databricks.grants.GrantsGrant
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
principal
|
TYPE:
|
privileges
|
TYPE:
|