Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PE Location Variable for Databricks Workspace #92

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/databricksworkspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ list(object({

Default: `[]`

### <a name="input_location_private_endpoint"></a> [location\_private\_endpoint](#input\_location\_private\_endpoint)

Description: Specifies the location of the private endpoint. Use this variables only if the private endpoint(s) should reside in a different location than the service itself.

Type: `string`

Default: `null`

### <a name="input_private_dns_zone_id_databricks"></a> [private\_dns\_zone\_id\_databricks](#input\_private\_dns\_zone\_id\_databricks)

Description: Specifies the resource ID of the private DNS zone for Azure Databricks. Not required if DNS A-records get created via Azure Policy.
Expand Down
4 changes: 2 additions & 2 deletions modules/databricksworkspace/connectivity.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "azurerm_private_endpoint" "private_endpoint_databricks_workspace_databricks_ui_api" {
name = "${azurerm_databricks_workspace.databricks_workspace.name}-uiapi-pe"
location = var.location
location = var.location_private_endpoint != null ? var.location_private_endpoint : var.location
resource_group_name = azurerm_databricks_workspace.databricks_workspace.resource_group_name
tags = var.tags

Expand Down Expand Up @@ -33,7 +33,7 @@ resource "azurerm_private_endpoint" "private_endpoint_databricks_workspace_brows
count = var.databricks_workspace_browser_authentication_private_endpoint_enabled ? 1 : 0

name = "${azurerm_databricks_workspace.databricks_workspace.name}-auth-pe"
location = var.location
location = var.location_private_endpoint != null ? var.location_private_endpoint : var.location
resource_group_name = azurerm_databricks_workspace.databricks_workspace.resource_group_name
tags = var.tags

Expand Down
1 change: 1 addition & 0 deletions modules/databricksworkspace/tests/test.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ run "create_databricksworkspace" {

variables {
location = "northeurope"
location_private_endpoint = "northeurope"
resource_group_name = "tfmodule-test-rg"
tags = var.tags
databricks_workspace_name = "tftst-dbptt001"
Expand Down
8 changes: 8 additions & 0 deletions modules/databricksworkspace/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ variable "location" {
nullable = false
}

variable "location_private_endpoint" {
description = "Specifies the location of the private endpoint. Use this variables only if the private endpoint(s) should reside in a different location than the service itself."
type = string
sensitive = false
nullable = true
default = null
}

variable "resource_group_name" {
description = "Specifies the resource group name in which all resources will get deployed."
type = string
Expand Down