โ04-25-2023 01:13 PM
We have setup SCIM with Okta at the account-level and setup Unity Catalog and are in the process of migrating groups from workspace-local to account-level. I have an instance profile that was assigned to a workspace-local group. using `databricks_group_instance_profile`. I'm trying to grant the account-level group access to the instance profile (the profile grants access to resources other than S3) and both `databricks_group_instance_profile` and `databricks_group_role` return the following error:
cannot create group instance profile: invalidSyntax Groups attribute cannot be updated as group [name] can only be managed in account.
Or
cannot create group role: invalidSyntax Groups attribute cannot be updated as group [name] can only be managed in account.
If I set the provider to point to accounts.cloud.databricks.com then I get:
cannot create group role: invalidValue Invalid role value [arn]
Or
cannot create group instance profile: invalidValue Invalid role value [arn]
Finally, on a lark I tried to create the `databricks_instance_profile` using the accounts.cloud.databricks.com host and that didn't work either (as expected):
cannot create instance profile: HTTP method POST is not supported by this URL
Using `databricks_group_instance_profile` using the workspace host will actually set the permission successfully even though it throws an error. However, because of the error the resource is never added to Terraform state and `terraform apply` fails anyway so it wouldn't matter anyhow.
Granting permission to the group on the instance profile works fine manually if I use the workspace UI, but that is only a temporary fix since we manage our entire workspace in terraform. How am I supposed to get this to work?
Terraform: v1.4.2
Databricks provider(s): v1.13.0, v1.14.3
โ07-20-2023 11:36 AM
Retried this using `databricks_group_role` after the `1.210` release of the `databricks/databricks` provider. This worked with an account-level group using the workspace provider and credentials.
โ04-26-2023 09:55 PM
@Mark Millerโ :
The error you are facing suggests that the group you are trying to manage can only be managed at the account level, which means you cannot manage it at the workspace level. This error typically occurs when you attempt to assign a group to an instance profile or role that is outside the scope of the workspace.
To resolve this issue, you can try the following:
Here's an example of how you could create a group and grant it access to an instance profile:
resource "databricks_instance_profile" "example" {
name = "example-instance-profile"
}
resource "databricks_group" "example" {
display_name = "example-group"
provider = databricks.accounts
}
resource "databricks_group_instance_profile" "example" {
group_id = databricks_group.example.id
instance_profile_arn = databricks_instance_profile.example.arn
}
This creates a new instance profile and group at the account level, and then grants the group access to the instance profile.
โ05-01-2023 11:47 PM
Hi @Mark Millerโ
Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.
We'd love to hear from you.
Thanks!
โ05-09-2023 04:12 PM
โ07-20-2023 11:36 AM
Retried this using `databricks_group_role` after the `1.210` release of the `databricks/databricks` provider. This worked with an account-level group using the workspace provider and credentials.
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