azurerm_databricks_virtual_network_peering

Manages a Databricks Virtual Network Peering

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_virtual_network" "remote" {
  name                = "remote-vnet"
  resource_group_name = azurerm_resource_group.example.name
  address_space       = ["10.0.1.0/24"]
  location            = azurerm_resource_group.example.location
}

resource "azurerm_databricks_workspace" "example" {
  name                = "example-workspace"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  sku                 = "standard"
}

resource "azurerm_databricks_virtual_network_peering" "example" {
  name                = "databricks-vnet-peer"
  resource_group_name = azurerm_resource_group.example.name
  workspace_id        = azurerm_databricks_workspace.example.id

  remote_address_space_prefixes = azurerm_virtual_network.remote.address_space
  remote_virtual_network_id     = azurerm_virtual_network.remote.id
  allow_virtual_network_access  = true
}

resource "azurerm_virtual_network_peering" "remote" {
  name                         = "peer-to-databricks"
  resource_group_name          = azurerm_resource_group.example.name
  virtual_network_name         = azurerm_virtual_network.remote.name
  remote_virtual_network_id    = azurerm_databricks_virtual_network_peering.example.virtual_network_id
  allow_virtual_network_access = true
}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Databrick Virtual Network Peerings can be imported using the resource id, e.g.

terraform import azurerm_databricks_virtual_network_peering.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1/virtualNetworkPeerings/peering1