-
Notifications
You must be signed in to change notification settings - Fork 398
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
[FEATURE] Support databricks_grant
, databricks_permission
etc. resources
#1976
Comments
@karlschriek |
That's a shame, should I log a request somewhere for the API to be expanded? |
@karlschriek if you mention it to your account team, I have also flagged it with the product team to put it on their backlog |
@karlschriek @nkvuong any update on this topic? This should have priority imho. Side question: how would is it possible to add a single grant in the UI but not via API? |
+1 to this feature. |
My client, a large governmental agency, is also butting against this limitation and is sorely in need of a more flexible way to manage permissions in a higly distributed environment. As proposed in the feature request, you would need to implement a unique identifier per role assignment / ACL instance, so that incremental changes can be applied and removed without any risk of modifying or deleting the wrong ACL. Going this route would enable Terraform to track the assignment instance as a stateful resource rather than the entire access control list. |
+1 |
+1 The only workaround for now, is that all the parties involved in granting privileges in the metastore/catalog.. use the Update permissions databricks API which has a nice Any update about this topic? It lasts for February.. |
#3024 addresses
|
@martin-walsh there is PATCH support for permissions as well: https://docs.databricks.com/api/workspace/tokenmanagement/updatepermissions |
Oh nice, and that won't overwrite all the existing permissions for the token ? |
yes, it's in general API design: PATCH is doing partial update, and PUT is overwriting everything |
What is the status on this? - I see that |
@kvedes |
@nkvuong Thank you, I thought I had tested that but it seems to work. |
Is |
Use-cases
The databricks provider currently offers resources such as
databricks_grants
anddatabricks_permissions
(and probably several others that work in the same manner, but those are the two I am working with right now). These resources require you to assign all grants/permissions for a specific entity (such as a metastore, catalog, etc.) within the same resource.For example (from the official docs):
The above is the only place where I can add grants to the
databricks_metastore.this.id
resource. Any additional combinations of entity, principal and privilege can only be added here. This makes composition in complicated terraform projects extremely difficult. We generally follow the principle of modular composition where each individual module is self-contained and additional, self-contained modules can be added without needing to change existing ones. With a resource such asdatabricks_grants
this is not possible. We would prefer to set a singular resources such asdatabricks_grant
(anddatabricks_permission
etc.) for each specific combination of entity/principal/privileges.This would be in line with how role assignments are for example dealt with by the Azure Resource Manager.
This is possible because the "name" field is what uniquely defines the role assignment resource.
Proposal
I would suggest allow for a
databricks_grant
(and similar for other resources) as follows:The text was updated successfully, but these errors were encountered: