databricks / terraform-databricks-sra

The Security Reference Architecture (SRA) implements typical security features as Terraform Templates that are deployed by most high-security organizations, and enforces controls for the largest risks that customers ask about most often.
Other
57 stars 27 forks source link

"refactored Nathan's Private DBFS & added conditionals" #72

Closed databeaks closed 1 month ago

databeaks commented 1 month ago

I added a boolean variable in the azure/tf/modules/azure_spoke/variables.tf (default is true) for implementing private dbfs

Fortunately @nathanknox already had the private dbfs terraform code in the Azure SRA folder. I uncommented the azure/tf/modules/azure_spoke/dbfs_privatelink.tf file and added the following conditionals. Each block in the azure/tf/modules/azure_spoke/dbfs_privatelink.tf will have:

count = var.boolean_create_private_dbfs ? 1 : 0
depends_on = [ azurerm_databricks_workspace.this ]

The first line checks if the variable boolean_create_private_dbfs is set to true (default) or false. Leaving as default or setting to explicit true in the *.tfvars will create all the private dbfs resources as long as the azurerm_databricks_workspace.this dependency is complete.

nathanknox commented 1 month ago

Looks good, thanks Tony!