Azure
Setting Up Terraform
SAT v0.5.0 and higher requires Unity Catalog. Make sure Unity Catalog is enabled in your Databricks environment before installing SAT.
SAT v0.2.0 or higher introduces full support for Unity Catalog. You can now pick your own catalog instead of being limited to the hive_metastore. Additionally, you have the flexibility to choose your own schema name.
SAT requires at least one SAT set up in a workspace per Azure subscription.
Step 1: Install Required Tools
Step 2: Clone the Repository
Clone the Security Analysis Tool repository using:
git clone https://github.com/databricks-industry-solutions/security-analysis-tool.git
Step 3: Navigate to the Terraform Directory
Navigate to the relevant cloud directory:
cd security-analysis-tool/terraform/<cloud>/
Step 4: Configure Variables
- Create a
terraform.tfvarsfile using thetemplate.tfvarsfile as a base. - Refer to the
variables.tffor descriptions of the variables. - Set all required variables for your deployment.
Azure-Specific Configuration
- Follow the Azure Setup Guide for variable setup.
Service Principal Role Requirements:
- "Reader" role at the subscription level via Access control (IAM).
- Accounts Admin role
- Admin role for each workspace
- Member of the metastore admin group
Refer to the documentation for workspace_url, workspace_id, and account_console_id
Step 5: Configure Azure CLI Credentials
- Set up Azure CLI credentials for the provider block in
provider.tf. - Use the Azure CLI to log in. The CLI will open a web browser for authentication:
az login
Proxies are now supported as part of SAT. You can add your HTTP and HTTPS links to use your proxies.
{
"http": "http://example.com",
"https": "https://example.com"
}
Run Terraform and SAT Workflows
Step 6: Run Terraform Commands
- Initialize Terraform:
terraform init
- Plan Terraform Changes - create a plan to preview changes to your infrastructure:
terraform plan
- Apply Terraform Plan - Execute the proposed changes:
terraform apply
Step 7: Run Databricks Jobs
- Run "SAT Initializer Notebook":
- This must be run successfully once. While it can be run multiple times, a single successful run is sufficient.
- Run "SAT Driver Notebook":
- This notebook can be scheduled to run periodically (e.g., every Monday, Wednesday, and Friday).
Step 8: Access the SAT Dashboard
- Navigate to the SQL > Dashboard in the left menu from the Databricks workspace.
- Select the SAT Dashboard, choose a Workspace from the dropdown, and refresh the dashboard.
Supplemental Documentation
Additional Considerations:
If a pre-existing secret scope named sat_scope causes jobs to fail:
- Rename the secret scope in
secrets.tf - Re-run
terraform apply. - Update the secret scope name in 6 locations (
CMD 4andCMD 5) ofWorkspace -> Applications -> SAT-TF/notebooks/Utils/initialize. - Re-run failed jobs
Congratulations! 🎉 You are now ready to start using the SAT. Please click here for a detailed description on how to run and use it.