cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Attach a databricks_instance_pool to databricks_cluster_policy via terraform

mannepk85
New Contributor III

Hello Team,

I am trying to create a databricks instance pool and attach it to a cluster policy in our terraform code. But I am having hard time finding a good documentation. Has any one done it? Below is my sample code and I am getting error

I keep getting error in Databricks UI "Invalid JSON". Json is valid. Is it even possible to attach the instance pool at cluster policy level or should it be done at cluster level only?

resource "databricks_instance_pool" "dev_test_cluster_pool" {
instance_pool_name = "dev_test_cluster_pool-small"
provider = databricks.workspace-development
idle_instance_autotermination_minutes = 10
min_idle_instances = 1
node_type_id = m6gd.large
aws_attributes {
availability = "ON_DEMAND"
spot_bid_price_percent = "100"
}
}

resource "databricks_cluster_policy" "dev_test_policy" {
provider = databricks.workspace-development
name = "app.databricks.dev.test.app.policy"
........ # removed other attributes
"instance_pool_id":databricks_instance_pool.dev_test_cluster_pool.id
description = "this Policy is managed by terraform and created for testing pools"

}
1 ACCEPTED SOLUTION

Accepted Solutions

mannepk85
New Contributor III

Fixed it! 

"instance_pool_id" : {
type = "fixed"
values = "databricks_instance_pool.dev_test_cluster_pool.id"
}

View solution in original post

1 REPLY 1

mannepk85
New Contributor III

Fixed it! 

"instance_pool_id" : {
type = "fixed"
values = "databricks_instance_pool.dev_test_cluster_pool.id"
}

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group