I am using Databricks Apps, and I want to grant privileges to the auto-generated service principal from the app to read specific Unity Catalog schemas. I can't find a way to do this automatically using Asset Bundles.
I prefer to query using a service principal rather than users to avoid making frequent changes to groups or schemas for general apps. However, it is very tedious to grant the permissions manually when managing QA and Prod environments.
My thoughts are:
Should I create an external service principal for this kind of data app?
Should I use the service principal created automatically in the app? how to automatize ? maybe with terraform instead asset bundles ?
Should I create a group for each app and apply it to the schemas that I need?
I really want to use the second option, but I need it to be fully automated.