Skip to content

microsoftexpert/tf-mod-databricks-instance-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧱 Databricks Instance Pool Terraform Module

Provisions a Databricks instance pool β€” a maintained set of idle, ready-to-use cloud instances that clusters attach to for faster start and autoscale times β€” against the databricks/databricks provider ~> 1.117.0.

Terraform Provider Module Type Resources Posture

🧩 Overview

  • πŸ–₯️ Creates one databricks_instance_pool β€” a warm-instance reservoir shared across many clusters, independent of any single cluster's lifecycle.
  • ☁️ Exposes AWS, Azure, and GCP attribute blocks as three separate, un-abstracted variables β€” the caller supplies only the one matching their workspace's cloud.
  • πŸ’² Defaults idle_instance_autotermination_minutes to 30 and min_idle_instances to 0, so an empty call never leaves standing warm capacity billing indefinitely.
  • πŸ” preloaded_docker_images (map of Docker image + optional registry credentials) is marked sensitive = true in whole, since the schema's basic_auth.password leaf is an unavoidable plaintext secret field.
  • 🚫 Never accepts a credential, host, or account ID.
  • 🌍 Workspace-plane only β€” this resource cannot be used with an account-level provider.

πŸ’‘ Why it matters: a pool with a permissive idle_instance_autotermination_minutes or a nonzero min_idle_instances left on by default is compute cost that accrues whether or not any cluster ever attaches β€” this module makes the cost-neutral configuration the one a caller gets without typing anything extra.


❀️ Support this project

If these Terraform modules have been helpful to you or your organization, I'd appreciate your support in any of the following ways:

Whether it's a star, a professional connection, or a coffee, every gesture helps keep these modules actively maintained and continually improving. Thank you for being part of the community!


πŸ—ΊοΈ Where this fits

flowchart LR
 THIS["tf-mod-databricks-instance-pool"]
 style THIS fill:#FF3621,color:#fff,stroke:#1B3139,stroke-width:1px

 CLUSTER["tf-mod-databricks-cluster"]
 style CLUSTER fill:#1B3139,color:#fff,stroke:#1B3139,stroke-width:1px

 POLICY["tf-mod-databricks-cluster-policy"]
 style POLICY fill:#F2F2F2,color:#1B3139,stroke:#CCCCCC,stroke-width:1px

 PERMS["tf-mod-databricks-permissions"]
 style PERMS fill:#F2F2F2,color:#1B3139,stroke:#CCCCCC,stroke-width:1px

 THIS -->|"id becomes instance_pool_id"| CLUSTER
 POLICY -->|"id becomes policy_id"| CLUSTER
 THIS -.->|"id referenced by principal grants"| PERMS
Loading

tf-mod-databricks-cluster is this module's keystone/target sibling β€” a cluster's instance_pool_id input is this module's id output. tf-mod-databricks-cluster-policy feeds the same downstream cluster call independently. tf-mod-databricks-permissions is an optional downstream consumer that binds Manage/Attach to rights to the pool's id β€” it does not create the pool and is not created by this module.

🧬 What this builds

flowchart TB
 subgraph INPUTS["var.*"]
 NAME["instance_pool_name / idle_instance_autotermination_minutes / custom_tags"]
 SIZE["min_idle_instances / max_capacity / enable_elastic_disk / node_type_id / preloaded_spark_versions"]
 CLOUD["aws_attributes / azure_attributes / gcp_attributes (mutually exclusive by convention)"]
 ADV["disk_spec / node_type_flexibility / instance_pool_fleet_attributes / preloaded_docker_images"]
 end

 KEYSTONE["databricks_instance_pool.this"]
 style KEYSTONE fill:#1B3139,color:#fff,stroke:#1B3139,stroke-width:1px

 subgraph OUTPUTS["outputs"]
 ID["id"]
 PID["instance_pool_id (echo)"]
 PNAME["instance_pool_name (echo)"]
 end

 NAME --> KEYSTONE
 SIZE --> KEYSTONE
 CLOUD --> KEYSTONE
 ADV --> KEYSTONE

 KEYSTONE --> ID
 KEYSTONE --> PID
 KEYSTONE --> PNAME
Loading

Resource inventory: one resource, databricks_instance_pool.this. No child collection β€” the "breadth" in this module comes from seven optional nested blocks (aws_attributes, azure_attributes, gcp_attributes, disk_spec, node_type_flexibility, instance_pool_fleet_attributes, preloaded_docker_image), all rendered via dynamic blocks.

βœ… Provider / Versions

Requirement Value
Terraform >= 1.12.0
databricks/databricks ~> 1.117.0
Provider block None β€” the caller's root module configures provider "databricks" {}
custom_tags Supported by databricks_instance_pool per schema.json β€” exposed as optional(map(string), {}), capped at the provider's documented 43-entry limit
timeouts Not present on databricks_instance_pool in the pinned schema β€” none added

Schema notes that bite:

  • custom_tags is present here but absent on tf-mod-databricks-cluster-policy. Both are "compute governance" standalone modules in this library's catalog, but databricks_cluster_policy has no tags argument at all in schema.json while databricks_instance_pool does β€” this is a genuine per-resource schema difference, not an inconsistency in this library. Do not add custom_tags to cluster-policy by analogy, and do not drop it here by analogy either.
  • aws_attributes / azure_attributes / gcp_attributes are each max_items = 1 blocks that are mutually exclusive only by convention. Neither the provider schema nor this module enforces "exactly one of these three" β€” a caller targeting an Azure workspace should supply only azure_attributes and leave the other two null; supplying more than one is a configuration error this module does not block at plan time (see this library's "Cloud scope" guidance against a cloud-agnostic abstraction).
  • node_type_id is documented as "(Required)" in the provider's prose but is Optional in schema.json. This module follows the schema (verified via terraform providers schema -json), not the prose β€” a fleet-based or flexible-node-type pool can validly omit it.
  • idle_instance_autotermination_minutes is Required with no stated API default. This module supplies a house default of 30 (see 🧱 Design Principles).
  • preloaded_docker_image is a repeatable set block, not max_items = 1. This module renders it via a dynamic block over a caller-keyed preloaded_docker_images map rather than a single optional object.
  • preloaded_docker_image.basic_auth.password is sensitive: true in the live schema. The corresponding module variable is marked sensitive = true in whole β€” Terraform cannot mark a single nested leaf sensitive independently of its parent variable.
  • provider_config { workspace_id } exists but is deliberately not exposed, consistent with the rest of this library's Unity Catalog / compute chain (metastore, catalog, schema, volume).
  • id is the provider's own opaque instance pool identifier; instance_pool_id is a second, separately-computed attribute in the schema that mirrors it.

πŸ”‘ Required Databricks Permissions & Scopes

  • Instance pool creation is controlled by the allow_instance_pool_create entitlement on databricks_group/databricks_user β€” the applying identity (or a group it belongs to) must hold this entitlement, or be a workspace admin.
  • databricks_permissions (a separate module in this library) governs which principals may later Manage or Attach to the pool this module creates β€” this module does not set those permissions itself.

Databricks Prerequisites

  • Workspace-level provider context β€” confirmed via the live provider documentation: "This resource can only be used with a workspace-level provider!"
  • If node_type_id is set, it should be a valid node type for the target cloud/region (commonly sourced from the databricks_node_type data source) β€” this module does not validate node type strings against a live catalog, since that requires a workspace API call this plan-only authoring process does not make.
  • If preloaded_docker_image entries are supplied, Databricks Container Services must be enabled in the workspace's Admin Console (Advanced page) β€” this module cannot verify that flag at plan time.

πŸ“ Module Structure

tf-mod-databricks-instance-pool/
β”œβ”€β”€ providers.tf # required_providers only β€” no provider {} block
β”œβ”€β”€ variables.tf # instance_pool_name, idle_instance_autotermination_minutes,...
β”œβ”€β”€ main.tf # databricks_instance_pool.this
β”œβ”€β”€ outputs.tf # id first, then instance_pool_id / instance_pool_name echoes
β”œβ”€β”€ SCOPE.md # cross-module contract
β”œβ”€β”€ README.md # this file
└── examples/
 └── basic/
 └── main.tf # smallest real, runnable call

βš™οΈ Quick Start

module "general_purpose_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "general-purpose-pool"
  node_type_id       = "i3.xlarge"
  min_idle_instances = 1
  max_capacity       = 20
}

The caller's root module configures the provider and its authentication; this module accepts neither.

πŸ”Œ Cross-Module Contract

Consumes:

Input Type Source module
node_type_id optional(string) databricks_node_type data source (not an module)
preloaded_spark_versions optional(list(string), []) databricks_spark_version data source (not an module)

This module has no required cross-module inputs β€” node_type_id and preloaded_spark_versions are commonly sourced from provider data sources rather than sibling module outputs, since no module in this catalog owns node-type or runtime-version identity.

Emits:

Output Description Consumed by
id Canonical unique identifier for this instance pool tf-mod-databricks-cluster (instance_pool_id input, once that module exists), tf-mod-databricks-permissions
instance_pool_id Echo of the provider's own instance_pool_id attribute (mirrors id) Same as id, offered under the matching field name
instance_pool_name Echo of the created pool's name Auditing / drift-detection tooling

πŸ“š Example Library

1 Β· Minimal least-privilege baseline (recommended starting point)
module "baseline_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "baseline-pool"
  node_type_id       = "i3.xlarge"
}

πŸ’‘ With no other input, this pool defaults to idle_instance_autotermination_minutes = 30 and min_idle_instances = 0 β€” no standing warm capacity, no unbounded idle billing.

2 Β· Faster idle autotermination for a bursty, cost-sensitive workload
module "bursty_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name                    = "bursty-pool"
  node_type_id                          = "i3.xlarge"
  idle_instance_autotermination_minutes = 10
}
3 Β· Longer idle autotermination for a pool backing frequent, short-lived jobs
module "frequent_jobs_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name                    = "frequent-jobs-pool"
  node_type_id                          = "i3.xlarge"
  idle_instance_autotermination_minutes = 120
  min_idle_instances                    = 2
}

⚠️ Raising both idle_instance_autotermination_minutes and min_idle_instances above their defaults trades cost for start-time latency β€” document the reasoning for this pool's use case.

4 Β· AWS attributes β€” spot instances with an instance profile
module "aws_spot_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "aws-spot-pool"
  node_type_id       = "i3.xlarge"
  max_capacity       = 50

  aws_attributes = {
    availability           = "SPOT"
    spot_bid_price_percent = 100
    instance_profile_arn   = "arn:aws:iam::123456789012:instance-profile/databricks-pool-role"
    zone_id                = "us-east-1a"
  }
}
5 Β· Azure attributes β€” on-demand availability
module "azure_ondemand_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "azure-ondemand-pool"
  node_type_id       = "Standard_DS3_v2"
  max_capacity       = 30

  azure_attributes = {
    availability = "ON_DEMAND_AZURE"
  }
}

ℹ️ Leave aws_attributes and gcp_attributes unset (null, the default) on an Azure workspace β€” this module does not reject setting more than one cloud attribute block, but only one is meaningful to the underlying API call.

6 Β· Azure attributes β€” spot instances with a max bid price
module "azure_spot_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "azure-spot-pool"
  node_type_id       = "Standard_DS3_v2"

  azure_attributes = {
    availability       = "SPOT_AZURE"
    spot_bid_max_price = -1
  }
}
7 Β· GCP attributes β€” preemptible with fallback
module "gcp_preemptible_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "gcp-preemptible-pool"
  node_type_id       = "n1-standard-4"

  gcp_attributes = {
    gcp_availability = "PREEMPTIBLE_WITH_FALLBACK_GCP"
    local_ssd_count  = 1
  }
}
8 Β· Preloaded Spark runtime version for faster cluster start
module "preloaded_runtime_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name       = "preloaded-runtime-pool"
  node_type_id             = "i3.xlarge"
  preloaded_spark_versions = ["15.4.x-scala2.12"]
}
9 Β· Disk spec β€” AWS EBS general purpose SSD
module "aws_disk_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "aws-disk-pool"
  node_type_id       = "i3.xlarge"

  disk_spec = {
    disk_count = 1
    disk_size  = 100
    disk_type = {
      ebs_volume_type = "GENERAL_PURPOSE_SSD"
    }
  }
}
10 Β· Node type flexibility β€” alternate driver node types
module "flexible_node_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "flexible-node-pool"
  node_type_id       = "Standard_DS3_v2"

  node_type_flexibility = {
    alternate_node_type_ids = ["Standard_DS4_v2", "Standard_DS5_v2"]
  }
}
11 Β· Fleet attributes β€” AWS EC2 Fleet with spot allocation and a launch template override
module "fleet_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "fleet-pool"

  instance_pool_fleet_attributes = {
    fleet_spot_option = {
      allocation_strategy         = "PRICE_CAPACITY_OPTIMIZED"
      instance_pools_to_use_count = 2
    }
    launch_template_override = [
      { availability_zone = "us-east-1a", instance_type = "i3.xlarge" },
      { availability_zone = "us-east-1b", instance_type = "i3.2xlarge" },
    ]
  }
}

ℹ️ node_type_id is intentionally omitted here β€” a fleet-based pool sources capacity through launch_template_override instead of a single fixed node type, which is exactly the case this module's node_type_id variable documents as a valid reason to leave it null.

12 Β· Custom tags for cost allocation
module "tagged_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "tagged-pool"
  node_type_id       = "i3.xlarge"

  custom_tags = {
    cost-center = "data-platform"
    environment = "production"
  }
}

⚠️ Databricks rejects a cluster/pool pair that sets the same tag key on both β€” coordinate custom_tags here with the attaching cluster's own tag set.

13 Β· Preloaded Docker image with registry credentials
module "docker_preload_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name = "docker-preload-pool"
  node_type_id       = "i3.xlarge"

  preloaded_docker_images = {
    analytics_runtime = {
      url = "myregistry.azurecr.io/analytics-runtime:latest"
      basic_auth = {
        username = "myregistry-pull-user"
        password = var.registry_pull_password # sourced from a secret, never a literal
      }
    }
  }
}

πŸ”’ preloaded_docker_images is marked sensitive = true on this module β€” plan/apply output redacts the whole map, including url, because Terraform cannot scope sensitivity to the nested password field alone. Prefer referencing a Databricks secret path ({{secrets/scope/key}}) as the credential value over a literal wherever the workspace supports it, per the provider's own documentation.

14 Β· Elastic disk explicitly enabled (opt-in)
module "elastic_disk_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name  = "elastic-disk-pool"
  node_type_id        = "i3.xlarge"
  enable_elastic_disk = true
}

⚠️ enable_elastic_disk = true lets instances keep acquiring disk space while idle-warm in the pool β€” this module defaults to false precisely to avoid that open-ended cost; enable only for a reviewed workload that genuinely needs it.

πŸ—οΈ 15 Β· End-to-end composition β€” instance pool feeding a workspace cluster
module "shared_pool" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-instance-pool.git?ref=v1.0.0"

  instance_pool_name                    = "shared-etl-pool"
  node_type_id                          = "i3.xlarge"
  idle_instance_autotermination_minutes = 30
  min_idle_instances                    = 1
  max_capacity                          = 40

  aws_attributes = {
    availability = "ON_DEMAND"
  }
}

module "etl_cluster" {
  source = "git::https://github.com/microsoftexpert/tf-mod-databricks-cluster.git?ref=v1.0.0"

  cluster_name       = "etl-cluster"
  spark_version      = "15.4.x-scala2.12"
  instance_pool_id   = module.shared_pool.id
  data_security_mode = "USER_ISOLATION"
}

ℹ️ tf-mod-databricks-cluster had not yet been authored in this session at the time this example was written (its folder contains only a SCOPE.md; its .tf files had not yet been authored) β€” this composition reflects that module's planned instance_pool_id input per this library's module design catalog, not yet a verified cross-module terraform plan.

πŸ“₯ Inputs

Variable Type Default Notes
instance_pool_name string β€” (required) Unique, non-empty, < 100 characters
idle_instance_autotermination_minutes number 30 Required at the API level; house default documented in Design Principles
custom_tags map(string) {} Max 43 entries
enable_elastic_disk bool false Opt-in β€” unbounded disk growth cost risk
min_idle_instances number 0
max_capacity number null No house ceiling β€” API itself has no default limit
node_type_id string null Schema-optional despite "(Required)" prose
preloaded_spark_versions list(string) [] At most one entry
aws_attributes object(...) null AWS only, max_items = 1
azure_attributes object(...) null Azure only, max_items = 1
gcp_attributes object(...) null GCP only, max_items = 1
disk_spec object(...) null max_items = 1, nested disk_type also max_items = 1
node_type_flexibility object(...) null max_items = 1
instance_pool_fleet_attributes object(...) null max_items = 1
preloaded_docker_images map(object(...)) {} sensitive = true β€” repeatable set block, rendered via keyed map
Full variable declarations
variable "instance_pool_name" {
  type = string
}

variable "idle_instance_autotermination_minutes" {
  type    = number
  default = 30
}

variable "custom_tags" {
  type    = map(string)
  default = {}
}

variable "enable_elastic_disk" {
  type    = bool
  default = false
}

variable "min_idle_instances" {
  type    = number
  default = 0
}

variable "max_capacity" {
  type    = number
  default = null
}

variable "node_type_id" {
  type    = string
  default = null
}

variable "preloaded_spark_versions" {
  type    = list(string)
  default = []
}

variable "aws_attributes" {
  type = object({
    availability           = optional(string)
    instance_profile_arn   = optional(string)
    spot_bid_price_percent = optional(number)
    zone_id                = optional(string)
  })
  default = null
}

variable "azure_attributes" {
  type = object({
    availability       = optional(string)
    spot_bid_max_price = optional(number)
  })
  default = null
}

variable "gcp_attributes" {
  type = object({
    gcp_availability = optional(string)
    local_ssd_count  = optional(number)
    zone_id          = optional(string)
  })
  default = null
}

variable "disk_spec" {
  type = object({
    disk_count = optional(number)
    disk_size  = optional(number)
    disk_type = optional(object({
      ebs_volume_type        = optional(string)
      azure_disk_volume_type = optional(string)
    }))
  })
  default = null
}

variable "node_type_flexibility" {
  type = object({
    alternate_node_type_ids = list(string)
  })
  default = null
}

variable "instance_pool_fleet_attributes" {
  type = object({
    fleet_on_demand_option = optional(object({
      allocation_strategy         = string
      instance_pools_to_use_count = optional(number)
    }))
    fleet_spot_option = optional(object({
      allocation_strategy         = string
      instance_pools_to_use_count = optional(number)
    }))
    launch_template_override = optional(set(object({
      availability_zone = string
      instance_type     = string
    })))
  })
  default = null
}

variable "preloaded_docker_images" {
  type = map(object({
    url = string
    basic_auth = optional(object({
      username = string
      password = string
    }))
  }))
  default   = {}
  sensitive = true
}

🧾 Outputs

Output Description Sensitive?
id Canonical unique identifier for this instance pool No
instance_pool_id Echo of the provider's own instance_pool_id attribute (mirrors id) No
instance_pool_name Echo of the created pool's instance_pool_name No

🧠 Architecture Notes

  • idle_instance_autotermination_minutes has no API-level default, despite being Required. This module supplies 30 as its own house default (see 🧱 Design Principles) rather than forcing every caller to type a value the API itself would otherwise reject the create call over.
  • node_type_id's schema-vs-prose mismatch is a fact, not a guess. The live provider documentation's prose calls it "(Required)"; the pinned schema.json (from terraform providers schema -json, ground truth per this library's schema-fallback procedure) marks it Optional. This module follows the schema. Treat a fleet-based pool with no node_type_id as valid, not a bug.
  • Cloud attribute blocks are mutually exclusive by convention, never by validation. Setting more than one of aws_attributes / azure_attributes / gcp_attributes passes terraform validate and is only caught (if at all) by the live Databricks API at plan/apply time against a real workspace β€” out of scope for this authoring process.
  • preloaded_docker_images sensitivity is whole-variable, not per-field. Terraform's sensitive = true on a variable redacts the entire value in plan/apply output; there is no mechanism in the pinned Terraform version to mark only basic_auth.password sensitive while leaving url visible when both live inside the same object-typed map. This module accepts that trade-off rather than introducing a second, key-correlated password-only variable.
  • instance_pool_fleet_attributes.launch_template_override is rendered from a set, not a list. The schema's nesting_mode: "set" with min_items: 1 means at least one entry is required once the block is used; this module's dynamic block iterates the set as supplied by the caller with no ordering guarantee, matching the provider's own set semantics.
  • No for_each, no child resources. All configuration breadth in this module comes from typed optional nested blocks on the single keystone resource, not from a separate child resource type.

🧱 Design Principles

Concern Secure default Opt-out (caller must set explicitly)
Instance pool idle autotermination idle_instance_autotermination_minutes = 30 if the caller does not set it Caller sets a longer value, or 0 to terminate excess idle instances immediately; the API itself has no default, so this module's 30 mirrors tf-mod-databricks-cluster's autotermination_minutes = 30 for a consistent cost-control posture across compute types
Instance pool standing warm capacity min_idle_instances = 0 if the caller does not set it Caller sets a positive value explicitly, accepting that every idle instance above zero is compute cost incurred regardless of cluster attachment
Instance pool elastic disk enable_elastic_disk = false if the caller does not set it Explicit true required β€” avoids unbounded per-instance disk growth cost while a node stays idle-warm in the pool
Instance pool capacity ceiling max_capacity left null (no house ceiling) β€” the Databricks API itself documents no default limit Recommended, not enforced: set an explicit ceiling in cost-sensitive or regulated environments; this module does not invent an arbitrary number without workload knowledge

πŸ’‘ The first three rows above are candidates for this library's master Secure-by-default table β€” see this module's SCOPE.md for the exact proposed row text.

πŸš€ Runbook

cd tf-mod-databricks-instance-pool
terraform init -backend=false
terraform validate
terraform fmt -check

Pin consumers to an immutable tag β€” ?ref=v1.0.0 β€” never a branch. This module is plan-only; a human applies from CI after review.

πŸ§ͺ Testing

terraform validate / terraform fmt -check catch: missing required arguments, every closed-enum validation {} block in this module (aws_attributes.availability, azure_attributes.availability, gcp_attributes.gcp_availability, disk_spec.disk_type.*_volume_type, idle_instance_autotermination_minutes range, custom_tags/preloaded_spark_versions length limits), and malformed dynamic block structure. They do not catch: whether the applying identity actually holds the allow_instance_pool_create entitlement, whether a supplied node_type_id is valid for the target cloud/region, whether more than one cloud attribute block was supplied (a real API-side rejection this module's type system cannot express), or whether Container Services is enabled for a preloaded_docker_images call. Those require an actual plan/apply against a live workspace, out of scope for this authoring process.

πŸ’¬ Example Output

$ terraform output
id = "1234-567890-abc12345"
instance_pool_id = "1234-567890-abc12345"
instance_pool_name = "general-purpose-pool"

πŸ” Troubleshooting

Symptom Cause Fix
terraform validate fails on aws_attributes.availability / azure_attributes.availability / gcp_attributes.gcp_availability Value outside the closed enum this module validates Correct the value; re-verify against the live provider schema if the provider added a new option
terraform validate fails on idle_instance_autotermination_minutes Value outside the documented 0-10000 range Set a value inside the documented range
terraform validate fails on custom_tags More than 43 entries supplied Reduce the tag count below the provider's documented limit
Apply fails with a permissions error even though terraform validate passed Applying identity lacks allow_instance_pool_create Confirm the identity (or a group it belongs to) holds the entitlement, or is a workspace admin
Apply fails or behaves unexpectedly with both aws_attributes and azure_attributes set Cloud attribute blocks are mutually exclusive by convention only β€” this module does not block setting more than one Set only the attribute block matching the workspace's actual cloud
Apply fails for a preloaded_docker_images entry Container Services not enabled in the workspace's Admin Console, or the registry credentials are invalid Enable Container Services; verify credentials; prefer a Databricks secret-scope reference over a literal password
terraform plan shows the entire preloaded_docker_images value as (sensitive value) Expected β€” the variable is marked sensitive = true in whole, not per-field No action needed; this is the documented trade-off in Architecture Notes

πŸ”— Related Docs

  • databricks_instance_pool provider resource
  • tf-mod-databricks-cluster (downstream, consumes id as instance_pool_id)
  • tf-mod-databricks-cluster-policy (sibling compute-governance module, no custom_tags β€” see Schema notes that bite)
  • tf-mod-databricks-permissions (optional downstream, governs Manage/Attach access to this pool)
  • This module's SCOPE.md

πŸ’™ "Infrastructure as Code should be standardized, consistent, and secure."

About

No description or website provided.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages