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] Issue with databricks_grants resource and "MANAGE ALLOWLIST" #3566

Open
tlecomte opened this issue May 13, 2024 · 3 comments
Open

[ISSUE] Issue with databricks_grants resource and "MANAGE ALLOWLIST" #3566

tlecomte opened this issue May 13, 2024 · 3 comments

Comments

@tlecomte
Copy link

Configuration

resource "databricks_grants" "allowlist_grant" {
  provider  = databricks.workspace
  metastore = databricks_metastore.primary.id
  grant {
    principal  = "TheGroup"
    privileges = ["MANAGE ALLOWLIST"]
  }
}

Expected Behavior

Terraform should create the grants successfully.

Actual Behavior

First time Terraform fails with:

Error: cannot create grants: permissions for metastore-******* are &{[{TheGroup [MANAGE_ALLOWLIST] [Principal]}]}, but have to be {[{TheGroup [MANAGE ALLOWLIST] []}]}

And on further retries, Terraform fails with:

Error: cannot create grants: Duplicate privileges to add and delete.

Steps to Reproduce

  1. terraform apply

Terraform and provider versions

Is it a regression?

No, it's the 1st time we are trying.

Debug Output

(We don't have it right now, but we could adjust our CI to provide it if needed)

Important Factoids

This is preventing us from applying fine-grained permissions to look at the artifact allowlist. In the meantime, we'll have to grant metastore owner permissions.

Would you like to implement a fix?

Sorry, not at this point.

@nkvuong
Copy link
Contributor

nkvuong commented May 13, 2024

@tlecomte could you specify the permission as MANAGE_ALLOWLIST (with underscore, not space)

@tlecomte
Copy link
Author

Thanks @nkvuong, you're right, it does work correctly with MANAGE_ALLOWLIST with an underscore.

Maybe the error message could be improved?

@nkvuong
Copy link
Contributor

nkvuong commented May 14, 2024

@tlecomte we're trying to resolve it in this PR #3292

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