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

[FEATURE] Make metastore_admin role assignable via terraform #4346

Open
EMayneKT opened this issue Dec 23, 2024 · 2 comments
Open

[FEATURE] Make metastore_admin role assignable via terraform #4346

EMayneKT opened this issue Dec 23, 2024 · 2 comments
Labels
feature New feature or request

Comments

@EMayneKT
Copy link

Use-cases

We now use the auto-generated unity-catalog metastores but are unable to grant privileges on the system catalog or system schemas due to the following errors:
Error: cannot create grant: User does not have MANAGE on Catalog 'system'.
Error: cannot create grant: User does not have MANAGE on Schema 'system.billing'.

We can assign the metastore admin role via the Databricks console but this is an additional manual step in our deployment which we're trying to automate as far as possible.

Attempted Solutions

  • Importing metastore as a databricks_metastore resource to alter the owner but terraform 1.5.x doesn't support dynamic import blocks and the metastore ID must be passed in as a string literal.

  • Granting additional permissions to the terraform service principal but there are some not listed for the metastore admin role in the documentation.

  • Looked for metastore admin role for assignment (as account admin is assignable) but it doesn't exist.

Proposal

Could the metastore_admin role be made assignable in the same way the account_admin role is?

@EMayneKT EMayneKT added the feature New feature or request label Dec 23, 2024
@alexott
Copy link
Contributor

alexott commented Dec 24, 2024

"Metastore admin" in UI is just an owner of the metastore. Consider changing the owner to a group and adding your SP into that group.

Most probably it will be solved by #4321.

@EMayneKT
Copy link
Author

Thanks @alexott ! #4321 certainly looks like it would solve the problem if it supports changes to metastore ownership.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants