cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

issue related to Cluster Policy

Databricks_S
New Contributor II

Hello Databricks Community,

I am currently working on creating a Terraform script to provision clusters in Databricks. However, I've noticed that by default, the clusters created using Terraform have the policy set to "Unrestricted."

I would like to configure my Terraform script so that the default cluster policy is either "Personal Compute" or "Shared" instead of "Unrestricted." Could you please advise on the best approach to achieve this?

Thank you for your assistance.


#unitycatalog

3 REPLIES 3

Walter_C
Databricks Employee
Databricks Employee

Hello, many thanks for your question, on the cluster creation template there is an optional setting called policy_id, this id can be retrieved from the UI, if you go under Compute > Policies > Select the policy you want to set.

By default if the user you are using to create the cluster has Unrestricted cluster creation entitlement then all clusters will be created with it.

Source: https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/cluster#policy_i...

thank you so much for your help, I have a question regarding the use of policy IDs in the configuration of Databricks clusters. I'm curious to know whether policy IDs are static or subject to change. Specifically, I'm interested in understanding if policy IDs remain constant once assigned or if they can change over time. Could you please clarify this for me?

Walter_C
Databricks Employee
Databricks Employee

The policy id will persist, it is tied to the configuration you have set, even if changing the configuration of a custom policy it will persist with same policy 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