terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[FEATURE] Change "owner" of clusters
Requesting the ability to change the owner of a cluster to workaround the below error:
Error: cannot update cluster: Only Cluster Owner is allowed to change the secrets.
This is possible via the API but not via the provider:
https://docs.databricks.com/api/azure/workspace/clusters/changeowner https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/cluster
Use-cases
Change the "Cluster owner" to an owning group to which multiple identities can belong thus not limiting the ability to update secrets to the identity that created the cluster.
Note: the "cluster owner" doesn't appear to actually be a thing in the UI or when querying the metadata of a cluster using the CLI command databricks clusters get. I see the creator_user_name key which I presume is what is being referred to as the "cluster owner" as the value of that is the service principal that created the cluster, which is different to the service principal I'm using.
Attempted Solutions
None
Proposal
resource "databricks_cluster" "example" {
owner = "some-principal-id"
}
References
Wasn't able to find any other open or closed issues.
@databricks/eng-dev-ecosystem @databricks/field-dev-ecosystem this one looks simple, but not sure what is the right resource for this. databricks_cluster is already quite complex, so maybe we should use databricks_permissions?
There is no separate IS_OWNER permission for clusters, so it should be handled specially in the databricks_permissions - it's doable, but just adding one additional path.
hello @nkvuong @alexott , has this feature been implemented?
@portoedu no, as I mentioned half year ago - there is no corresponding permission, and a separate API is hard to fit. Please raise this issue to a solution architect who works with your account.