Skip to content

Instantly share code, notes, and snippets.

@lindacmsheard
Last active May 6, 2021 08:15
Show Gist options
  • Save lindacmsheard/980b088858f930f66e60c89d1c503ee1 to your computer and use it in GitHub Desktop.
Save lindacmsheard/980b088858f930f66e60c89d1c503ee1 to your computer and use it in GitHub Desktop.
databricks cli cheatsheet for managing secrets

Databricks CLI Cheatsheet - managing secrets

(optional) install cli into a virtual python env

virtualenv -p /usr/bin/python2.7 databrickscli
source databrickscli/bin/activate
pip install databricks-cli

Alternatively just install natively

pip install databricks-cli

Obtain a user token, and then connect to workspace and test

databricks configure --token
databricks clusters list
databricks workspace list

Manage scopes

databricks secrets list-scopes
databricks secrets list --scope keyvault         # Azure KeyVault backed scope - see ref below for details

databricks secrets create-scope --scope myscope  # needs premium workspace for admin owner
databricks secrets create-scope --scope myscope --initial-manage-principal-users

Manage secrets

databricks secrets put --scope adbscope --key my-storage-account-pk

Further Reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment