Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Provider enhancement request -> adding databricks_user_role for role assignment at account-level #1047

Closed
nkvuong opened this issue Jan 19, 2022 · 3 comments

Comments

@nkvuong
Copy link
Contributor

nkvuong commented Jan 19, 2022

Unity Catalog private preview will add account-level roles, starting with account_admin

This would require calling the SCIM API, similar to user_instance_profile. However, the ARN is currently validated so it does not work

Configuration

provider "databricks" {
  host = "https://accounts.cloud.databricks.com"
  account_id = var.account_id
  username = var.user
  password = var.password
}

resource "databricks_user" "my_user" {
  user_name = "me@example.com"
}

resource "databricks_user_role" "my_user_account_admin" {
  user_id             = databricks_user.my_user.id
  role = "account_admin"
}

Expected Behavior

This will create the me@example.com user at account-level, and assign the account admin role to my user

@nfx
Copy link
Contributor

nfx commented Jan 19, 2022

@nkvuong you've forgotten to add account_id on provider ;)

are you sure we don't need databricks_group_role as well?

@nkvuong
Copy link
Contributor Author

nkvuong commented Jan 19, 2022

we don't have role assignment to group yet, but could future proof it, as SCIM API is well known?

@nfx
Copy link
Contributor

nfx commented Jan 19, 2022

We may just add "roles" attribute to users :) though it might be more fragile.

@nfx nfx mentioned this issue Jan 21, 2022
100 tasks
@nfx nfx closed this as completed Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants