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_sql_permissions resource #4472

Open
forma-wolf opened this issue Feb 5, 2025 · 0 comments
Open

[ISSUE] Issue with databricks_sql_permissions resource #4472

forma-wolf opened this issue Feb 5, 2025 · 0 comments

Comments

@forma-wolf
Copy link

Configuration

# Copy-paste your Terraform configuration here
resource "databricks_sql_permissions" "hive_metastore_databricks_sql_permissions" {
  ...
  catalog = true
  dynamic "privilege_assignments" {
    ...
  }
  ...
}

resource "databricks_sql_permissions" "files_databricks_sql_permissions" {
  ...
  any_file   = true
  dynamic "privilege_assignments" {
    ...
  }
  ...
}

Expected Behavior

It should not remove existing permissions everytime we add new groups.

Actual Behavior

Everytime this resource gets applied it to hive_metastore it removes all permissions and then adds all permissions in configuration. This will result in outages due to permissioning of hive metastore being completely removed and and readded during this time period. Also the time period it takes to apply this is directly proportional to the number of schemas. We are up to having to apply terraform twice (because 1st apply fails out), took a period of 90 minutes.

Steps to Reproduce

  1. terraform apply this resource with an initial group.
  2. terraform apply this resource adding permissions for the second group (you will see that it says it is only adding the permissions for the second group which it should be)
  3. In reality, you are removing the permissions for all groups and re-adding the initial group, and second group's permissions.

Terraform and provider versions

  • Latest (issue has always existed)

Is it a regression?

  • No it has always worked like this and needs to be fixed. It's causing outages for customers using hive_metastore.

Debug Output

Important Factoids

  • Nope, we do have a large amount of schemas.

Would you like to implement a fix?

  • No
@forma-wolf forma-wolf changed the title [ISSUE] Issue with databricks_XXX resource [ISSUE] Issue with hive_metastore_databricks_sql_permissions resource Feb 5, 2025
@forma-wolf forma-wolf changed the title [ISSUE] Issue with hive_metastore_databricks_sql_permissions resource [ISSUE] Issue with databricks_sql_permissions resource Feb 5, 2025
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