GCP
Setting Up Terraform
Note
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.
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.tfvars
file using thetemplate.tfvars
file as a base. - Refer to the
variables.tf
for descriptions of the variables. - Set all required variables for your deployment.
Further Documentation for some of the variables:
GCP Specific Variables - navigate to the "Installation -> Credentials Needed" section
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 5: 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 6: 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 7: 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 4
andCMD 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.