Skip to content

Commit 80751ec

Browse files
Merge pull request #42 from databricks/cyber
commit cyber module
2 parents 997e4a0 + cd33e8e commit 80751ec

File tree

24 files changed

+3309
-228
lines changed

24 files changed

+3309
-228
lines changed

Diff for: examples/test_aws_full_lakehouse_example/.terraform.lock.hcl

+59
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: examples/test_azure_data_exfiltration_protection/firewall.tf

+1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ resource "azurerm_firewall" "this" {
8080
subnet_id = azurerm_subnet.firewall.id
8181
public_ip_address_id = azurerm_public_ip.this.id
8282
}
83+
depends_on = [azurerm_firewall_policy_rule_collection_group.this]
8384
}

Diff for: examples/test_azure_uc/clusters.tf

-58
This file was deleted.

Diff for: examples/test_azure_uc/external_data.tf

-64
This file was deleted.

Diff for: examples/test_azure_uc/main.tf

+5-38
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,14 @@
1-
resource "azurerm_resource_group" "this" {
2-
name = var.resource_group_name
3-
location = var.location
4-
tags = local.tags
5-
}
6-
7-
resource "azurerm_virtual_network" "this" {
8-
name = "${local.prefix}-vnet"
9-
location = azurerm_resource_group.this.location
10-
resource_group_name = azurerm_resource_group.this.name
11-
address_space = ["10.2.1.0/24"]
12-
}
13-
141
data "azurerm_client_config" "current" {}
152

163
data "external" "me" {
174
program = ["az", "account", "show", "--query", "user"]
185
}
196

20-
resource "azurerm_databricks_workspace" "this" {
21-
name = "${local.prefix}-workspace"
22-
resource_group_name = azurerm_resource_group.this.name
23-
location = azurerm_resource_group.this.location
24-
sku = "premium"
25-
managed_resource_group_name = "${local.prefix}-workspace-rg"
26-
tags = local.tags
27-
}
28-
29-
locals {
30-
resource_regex = "(?i)subscriptions/(.+)/resourceGroups/(.+)/providers/Microsoft.Databricks/workspaces/(.+)"
31-
subscription_id = regex(local.resource_regex, azurerm_databricks_workspace.this.id)[0]
32-
resource_group = regex(local.resource_regex, azurerm_databricks_workspace.this.id)[1]
33-
databricks_workspace_name = regex(local.resource_regex, azurerm_databricks_workspace.this.id)[2]
34-
tenant_id = data.azurerm_client_config.current.tenant_id
35-
prefix = replace(replace(lower(azurerm_resource_group.this.name), "rg", ""), "-", "")
36-
tags = {
37-
Environment = "TF Demo"
38-
Owner = lookup(data.external.me.result, "name")
39-
}
40-
}
41-
427
module "unity_catalog" {
438
source = "../../modules/azure_uc"
44-
45-
resource_group_id = azurerm_resource_group.this.id
46-
workspaces_to_associate = [azurerm_databricks_workspace.this.workspace_id]
9+
location = var.location
10+
resource_group_id = var.resource_group_name
11+
workspaces_to_associate = var.workspaces_to_associate
12+
databricks_resource_id = var.databricks_resource_id
13+
workspace_url = var.workspace_url
4714
}

Diff for: examples/test_azure_uc/outputs.tf

-11
This file was deleted.

Diff for: examples/test_azure_uc/providers.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ provider "azurerm" {
33
}
44

55
provider "databricks" {
6-
host = azurerm_databricks_workspace.this.workspace_url
6+
host = var.workspace_url
77
}

Diff for: examples/test_azure_uc/uc_objects_example.tf

-37
This file was deleted.

Diff for: examples/test_azure_uc/variables.tf

+11
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,14 @@ variable "location" {
77
type = string
88
description = "(Required) The location for the resources in this module"
99
}
10+
11+
variable "workspaces_to_associate" {
12+
type = list(string)
13+
description = "(Optional) List of Databricks Workspace IDs to associate with Unity Catalog"
14+
default = []
15+
}
16+
17+
variable "databricks_resource_id" {}
18+
19+
variable "workspace_url" {}
20+

Diff for: examples/test_cyber/.terraform.lock.hcl

+56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: examples/test_cyber/catalog.tf

Whitespace-only changes.

Diff for: examples/test_cyber/cluster.tf

Whitespace-only changes.

Diff for: examples/test_cyber/entities.tf

Whitespace-only changes.

0 commit comments

Comments
 (0)