Manage Delta Sharing with databricks_share
mainThe databricks_share resource manages a Delta Sharing share, which is a read-only collection of tables, views, volumes, and other objects shared with recipients.
Important Constraints:
- This resource must be used with a workspace-level provider.
- In Unity Catalog-enabled workspaces, a share is a securable object contained within a
databricks_metastore. Removing a share from the metastore revokes access for all recipients. - The
objectblocks are treated as an ordered list. To ensure consistent and readable Terraform diffs, it is recommended to defineobjectblocks in alphabetical order by theirnameargument.
Key Object Types:
TABLE,VIEW,MATERIALIZED_VIEW,STREAMING_TABLE,FOREIGN_TABLE(Useshared_asfor aliasing).VOLUME,MODEL,NOTEBOOK_FILE,FUNCTION(Usestring_shared_asfor aliasing).SCHEMA(Can include all current and future tables).NOTEBOOK_FILE(Requires base64 encodedcontent).
resource "databricks_share" "example" {
name = "my_share"
object {
name = "catalog.schema.table"
data_object_type = "TABLE"
}
}