databricks / terraform-databricks-examples

Examples of using Terraform to deploy Databricks resources
https://registry.terraform.io/modules/databricks/examples/databricks/latest
Other
187 stars 116 forks source link

Add support/example for authentication to databricks via Client ID/Secret for setup via Service Principal Oauth #75

Open jasondamour opened 1 year ago

jasondamour commented 1 year ago

We'd like to avoid having a specific user's username/password, so we're trying to use Service Principal Oauth secrets instead. The desired flow is:

  1. Admin User creates account on accounts.databricks.com
  2. Admin User's first and only action is creating an Admin Service Principal and generating oauth token
  3. Oath secret is added to Terraform variables (i.e. databricks_account_client_id and databricks_account_client_secret)
  4. All subsequent setup is done by terraform, authenticated as the Admin Service Principal