I am attempting to create a Databrick Repo in a workspace via Terraform. I would like the Repo and the associated Git Credential to be associated with a Service Principal.
In my initial run, the Terraform provider is associated with the user defined in the .databrickscfg file and when resources were created, the user had a link to the created Git Credential. This causes issues if that particular user already had a git credential (since there can only be 1 git credential associated with a user).
To avoid the Git Credential getting associated with the user, I would like to
- Create a Service Principal
- Create a git credential associated with that Service Provider
- Have the repo creation be done using that git credential. Basically, create the repo using the created Service Principal
I have not found a way to get the git credential associated with the SP and associate the SP with the Repo creation in terraform. I have seen some threads saying you can associate an SP for repo creation but they seem to be on Azure or just via the CLI? Can this be done in the databricks terraform provider?
Thank you.