One instance pool.
Creates one instance pool and, when permissions is not empty, one databricks_permissions block on it.
databricks_instance_pool.thisdatabricks_permissions.this[0](count = 1 only whenpermissionsis not empty)
The resource addresses above are part of the DataTF import contract. Do not rename them.
module "instance_pool" {
source = "536tech/instance-pool/databricks"
version = "1.0.1"
name = "shared-pool"
node_type_id = "Standard_DS3_v2"
min_idle_instances = 1
max_capacity = 10
idle_instance_autotermination_minutes = 15
enable_elastic_disk = true
preloaded_spark_versions = ["15.4.x-scala2.12"]
azure_attributes = {
availability = "ON_DEMAND_AZURE"
spot_bid_max_price = -1
}
permissions = [{
permission_level = "CAN_MANAGE"
user_name = "jon@example.com"
}]
}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 module rejects blank required names and invalid access inputs during the plan.
Cross-input preconditions preserve the Terraform 1.5 minimum and existing resource addresses.
A null or zero max_capacity keeps the provider's unlimited-capacity behavior.
Null remains valid for inputs where the provider supplies a default.
Provider and API checks still apply. These checks do not prove complete permission visibility.
Each permission needs exactly one nonblank principal and a supported resource-specific permission level.
databricks_permissions manages the object's permission set. Keep one state owner for that set.
Empty permissions omit the permission resource.
See provider permission semantics.
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_instance_pool.this (resource)
- databricks_permissions.this (resource)
The following input variables are required:
Description: Add disk space to pool instances when they run low.
Type: bool
Description: Minutes an idle instance stays in the pool above min_idle_instances.
Type: number
Description: Instances the pool keeps ready.
Type: number
Description: Instance pool name.
Type: string
Description: Azure VM size for the pool, for example Standard_DS3_v2.
Type: string
Description: Databricks Runtime versions cached on pool instances.
Type: list(string)
The following input variables are optional (have default values):
Description: Azure placement settings for pool instances.
Type:
object({
availability = optional(string)
spot_bid_max_price = optional(number)
})Default: null
Description: Tags applied to pool instances.
Type: map(string)
Default: null
Description: Maximum number of instances in the pool.
Type: number
Default: null
Description: Direct permissions on the pool. Each element names exactly one principal.
Type:
list(object({
permission_level = string
group_name = optional(string)
user_name = optional(string)
service_principal_name = optional(string)
}))Default: []
The following outputs are exported:
Description: Instance pool id.
Description: Instance pool name.