File tree Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ locals {
2
+ ncc_config_mapped = {
3
+ for object in flatten ([for sa in var . storage_accounts : [for kind in [" blob" , " dfs" ] : {
4
+ name = " ${ sa . name } -${ kind } "
5
+ kind = kind
6
+ id = sa.id
7
+ }]]) : object . name => object }
8
+ }
9
+
10
+ resource "databricks_mws_ncc_binding" "this" {
11
+ network_connectivity_config_id = var. network_connectivity_config_id
12
+ workspace_id = var. databricks_workspace_id
13
+ }
14
+
15
+ resource "databricks_mws_ncc_private_endpoint_rule" "this" {
16
+ for_each = local. ncc_config_mapped
17
+
18
+ network_connectivity_config_id = var. network_connectivity_config_id
19
+ resource_id = each. value . id
20
+ group_id = each. value . kind
21
+
22
+ depends_on = [databricks_mws_ncc_binding . this ]
23
+ }
Original file line number Diff line number Diff line change
1
+ variable "databricks_workspace_id" {
2
+ type = string
3
+ description = " Target Databricks Workspace id"
4
+ }
5
+
6
+ variable "network_connectivity_config_id" {
7
+ type = string
8
+ description = " Existing Network Connectivity Config ID in Databricks Account"
9
+ }
10
+
11
+ variable "storage_accounts" {
12
+ type = list (object ({
13
+ name = string
14
+ id = string
15
+ }))
16
+ description = " List of object with parameters to configure NCC for Storage Account. Both blob and dfs private endpoints would be provisioned"
17
+ }
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_version = " >=1.0.0"
3
+
4
+ required_providers {
5
+ databricks = {
6
+ source = " databricks/databricks"
7
+ version = " >=1.44.0"
8
+ }
9
+ }
10
+ }
You can’t perform that action at this time.
0 commit comments