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_grant/databricks_grants resource #4411

Open
wolfm89 opened this issue Jan 17, 2025 · 0 comments
Open

[ISSUE] Issue with databricks_grant/databricks_grants resource #4411

wolfm89 opened this issue Jan 17, 2025 · 0 comments

Comments

@wolfm89
Copy link

wolfm89 commented Jan 17, 2025

Configuration

# deactive marketplace access for all users
resource "databricks_grant" "metastore" {
  metastore  = data.databricks_current_metastore.this.id
  principal  = "account users"
  privileges = []
}

data "databricks_current_metastore" "this" {
}

Expected Behavior

I would like to deactivate marketplace access for all users as explained here: https://docs.databricks.com/en/marketplace/get-started-consumer.html#disable-marketplace-access

By default, only the USE MARKETPLACE ASSETS metastore privilege is assigned to all users.
By taking away all privileges, I expect the USE MARKETPLACE ASSETS metastore privilege to be removed.

Actual Behavior

An error is thrown:

Error: cannot read grant: got empty permissions list

The documentation actually mentions that the privileges list must not be empty:
Image
(from https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/grant)

But how am I supposed to remove this single privilege then?

Steps to Reproduce

  1. terraform apply

Terraform and provider versions

Terraform v1.9.8
on linux_amd64
+ provider registry.terraform.io/databricks/databricks v1.50.0

Is it a regression?

No

Debug Output

Not needed, the error is clear. This is where the error is thrown:

return nil, apierr.NotFound("got empty permissions list")

Important Factoids

No

Would you like to implement a fix?

No

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

1 participant