One Unity Catalog catalog.
Creates one Unity Catalog catalog and, when grants is not empty, one databricks_grants block on it.
databricks_catalog.thisdatabricks_grants.this[0](count = 1 only whengrantsis not empty)
The resource addresses above are part of the DataTF import contract. Do not rename them.
module "catalog" {
source = "536tech/catalog/databricks"
version = "0.1.0"
name = "sales"
isolation_mode = "ISOLATED"
owner = "data-platform"
comment = "Sales domain"
storage_root = "abfss://sales@lake.dfs.core.windows.net/"
grants = [{
principal = "data-engineers"
privileges = ["USE_CATALOG", "USE_SCHEMA", "CREATE_SCHEMA"]
}]
}Configure the Databricks provider in the calling root with a workspace endpoint. This resource module is also used by the workspace pattern module. Each repository has its own releases. Consumers select an exact tested module version.
The resource addresses match the original workspace submodule in version 0.1.1.
To migrate a direct submodule call, change its source and version. Keep the module block name.
Run terraform init and require a plan with no resource changes.
DataTF exports continue to use the workspace pattern module and its existing import addresses.
Use Terraform 1.7 or later for the mock tests. The module supports Terraform 1.5 or later.
prek install
terraform init -backend=false -lockfile=readonly
terraform validate
terraform test
tflint --recursive
prek run --all-filesCI tests the committed provider version and the minimum supported provider, 1.128.0. The workspace pattern module checks the complete DataTF contract and its integration behavior.
The following requirements are needed by this module:
-
terraform (>= 1.5.0)
-
databricks (>= 1.128.0, < 2.0.0)
The following providers are used by this module:
- databricks (>= 1.128.0, < 2.0.0)
The following resources are used by this module:
- databricks_catalog.this (resource)
- databricks_grants.this (resource)
The following input variables are required:
Description: Catalog isolation mode: OPEN or ISOLATED.
Type: string
Description: Catalog name.
Type: string
Description: Catalog owner. A user, group, or service principal.
Type: string
The following input variables are optional (have default values):
Description: Catalog description.
Type: string
Default: null
Description: Allow Terraform to delete the catalog while it still contains schemas.
Type: bool
Default: false
Description: Direct catalog grants. A list permits computed service principal application IDs.
Type:
list(object({
principal = string
privileges = list(string)
}))Default: []
Description: Catalog properties.
Type: map(string)
Default: null
Description: Managed storage location for the catalog. Changing it replaces the catalog.
Type: string
Default: null
The following outputs are exported:
Description: Catalog id.
Description: Catalog name.