Databricks Example: Create Account User
In this quick start we will show you how you can use Hyper Cloud Automation to manage resources in a Databricks account. The example will walk you through creating a simple environment, adding a module to create users, and deploy it.
Prerequisite
For this example we will assume that you already have a Databricks account. We will need to create a service principle to be used by Hyper Cloud Automation.
- Go to your cloud databricks accout https://accounts.cloud.databricks.com/
- In the left navigation menu select
User management - In the
User managementwindow selectService Principalstab - Click on
Add service principlebutton - For
Nameputhypercloud-automationand pressAdd - Click on
hypercloud-automation - Click on
Rolestab and enableRole Admin
- Go back to
Principle informationtab - Click on
Generate secrettab - Note down values for
SecretandClient ID
- In the Hyper Cloud Automation click on Organization in the left hand navigation menu.
- Scroll to the Cloud Keys section.
- Press on
+Addbutton. - For
Cloud KeychooseDATABRICKS_CLIENT_SECRET. - Paste the value of the
Secretfrom the above step - For
Environmentchooseglobal.
- Press
Savebutton
Create environment
In this example we will create a simple environment which consist of a module that deploys a Databricks users.
- In the left naviation menu select
Environments - Click on
Add Environment - Name your environment
example-db-environment - Press
Add - Select
EXAMPLE-DB-ENVIRONMENTin the tabs - Press on the
+button in theRoot of the Environment - Select
AWS Databricks AccountData SourcetipPress
Expand Environmentbutton to expand/collapse the tree - In the
AWS Databricks Accountnode press on the button and fill in:Account IDwith the value of your Databricks Account ID.Client IDfrom the Prerequisites (Client ID is created along with the secret in the steps outlined in Prerequisites)
- Press
Save - On
AWS Databricks Accountnode press and selectDatabricks Account UsersModule - Click on button and set the settings like in this image

- Scroll down and press
Save.
Your first simple environment should look something like this:

Deploy
Deployment process consists of running a plan action folowed by approval process and then running apply
- In your environment locate
Databricks Account Usersmodule - Press on the in the module to start the
plan. Notice that theDeployment Statuswill change. - Once the
Deployment Statusis changed toPLAN SUCCESSclick on button to pop up the deploymentPLAN - In the top right corner press
TERRAFORM-APPLYbutton - Wait for deployment to finish.

- Go to your Databricks Account
- Go to
User management - You will find the user in the list

To review deployments log do:
- In the left navigation menu click on
Deployment Jobs - Click on the deployment job IDs to see the full logs

Destroy the bucket
- In the naviagion menu on the left select
Environments - In the tabs select
EXAMPLE-DB-ENVIRONMENT - Click on
Expand Environment - Click on button on the
Databricks Account Usersmodule. - Confirm the destruction plan
- Wait for
Destroyto complete - Go to your Databricks Account
- Go to
User management - The user is deleted
Cleanup
- In the left navigation menu click on
Organization - Delete the environment
EXAMPLE-DB-ENVIRONMENT. See also delete envrionment - Delete the service principle created in prerequisite