Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The workspaces/virtualNetworkPeerings resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Databricks/workspaces/virtualNetworkPeerings resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Databricks/workspaces/virtualNetworkPeerings@2026-01-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
allowForwardedTraffic: bool
allowGatewayTransit: bool
allowVirtualNetworkAccess: bool
databricksAddressSpace: {
addressPrefixes: [
'string'
]
}
databricksVirtualNetwork: {
id: 'string'
}
remoteAddressSpace: {
addressPrefixes: [
'string'
]
}
remoteVirtualNetwork: {
id: 'string'
}
useRemoteGateways: bool
}
}
Property Values
Microsoft.Databricks/workspaces/virtualNetworkPeerings
| Name | Description | Value |
|---|---|---|
| name | The resource name | string (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: workspaces |
| properties | List of properties for vNet Peering | VirtualNetworkPeeringPropertiesFormat (required) |
AddressSpace
| Name | Description | Value |
|---|---|---|
| addressPrefixes | A list of address blocks reserved for this virtual network in CIDR notation. | string[] |
VirtualNetworkPeeringPropertiesFormat
| Name | Description | Value |
|---|---|---|
| allowForwardedTraffic | Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. | bool |
| allowGatewayTransit | If gateway links can be used in remote virtual networking to link to this virtual network. | bool |
| allowVirtualNetworkAccess | Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. | bool |
| databricksAddressSpace | The reference to the databricks virtual network address space. | AddressSpace |
| databricksVirtualNetwork | The remote virtual network should be in the same region. See here to learn more (/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). | VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork |
| remoteAddressSpace | The reference to the remote virtual network address space. | AddressSpace |
| remoteVirtualNetwork | The remote virtual network should be in the same region. See here to learn more (/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). | VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork (required) |
| useRemoteGateways | If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. | bool |
VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork
| Name | Description | Value |
|---|---|---|
| id | The Id of the databricks virtual network. | string |
VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork
| Name | Description | Value |
|---|---|---|
| id | The Id of the remote virtual network. | string |
Usage Examples
Bicep Samples
A basic example of deploying Databricks Virtual Network Peering.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-07-01' = {
name: resourceName
location: location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.1.0/24'
]
}
dhcpOptions: {
dnsServers: []
}
subnets: []
}
}
resource workspace 'Microsoft.Databricks/workspaces@2023-02-01' = {
name: resourceName
location: location
properties: {
managedResourceGroupId: resourceId('Microsoft.Resources/resourceGroups', 'databricks-rg-${resourceName}')
publicNetworkAccess: 'Enabled'
}
sku: {
name: 'standard'
}
}
resource virtualNetworkPeering 'Microsoft.Databricks/workspaces/virtualNetworkPeerings@2023-02-01' = {
parent: workspace
name: resourceName
properties: {
allowForwardedTraffic: false
allowGatewayTransit: false
allowVirtualNetworkAccess: true
databricksAddressSpace: {
addressPrefixes: [
'10.139.0.0/16'
]
}
remoteAddressSpace: {
addressPrefixes: [
'10.0.1.0/24'
]
}
remoteVirtualNetwork: {
id: virtualNetwork.id
}
useRemoteGateways: false
}
}
ARM template resource definition
The workspaces/virtualNetworkPeerings resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Databricks/workspaces/virtualNetworkPeerings resource, add the following JSON to your template.
{
"type": "Microsoft.Databricks/workspaces/virtualNetworkPeerings",
"apiVersion": "2026-01-01",
"name": "string",
"properties": {
"allowForwardedTraffic": "bool",
"allowGatewayTransit": "bool",
"allowVirtualNetworkAccess": "bool",
"databricksAddressSpace": {
"addressPrefixes": [ "string" ]
},
"databricksVirtualNetwork": {
"id": "string"
},
"remoteAddressSpace": {
"addressPrefixes": [ "string" ]
},
"remoteVirtualNetwork": {
"id": "string"
},
"useRemoteGateways": "bool"
}
}
Property Values
Microsoft.Databricks/workspaces/virtualNetworkPeerings
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2026-01-01' |
| name | The resource name | string (required) |
| properties | List of properties for vNet Peering | VirtualNetworkPeeringPropertiesFormat (required) |
| type | The resource type | 'Microsoft.Databricks/workspaces/virtualNetworkPeerings' |
AddressSpace
| Name | Description | Value |
|---|---|---|
| addressPrefixes | A list of address blocks reserved for this virtual network in CIDR notation. | string[] |
VirtualNetworkPeeringPropertiesFormat
| Name | Description | Value |
|---|---|---|
| allowForwardedTraffic | Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. | bool |
| allowGatewayTransit | If gateway links can be used in remote virtual networking to link to this virtual network. | bool |
| allowVirtualNetworkAccess | Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. | bool |
| databricksAddressSpace | The reference to the databricks virtual network address space. | AddressSpace |
| databricksVirtualNetwork | The remote virtual network should be in the same region. See here to learn more (/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). | VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork |
| remoteAddressSpace | The reference to the remote virtual network address space. | AddressSpace |
| remoteVirtualNetwork | The remote virtual network should be in the same region. See here to learn more (/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). | VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork (required) |
| useRemoteGateways | If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. | bool |
VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork
| Name | Description | Value |
|---|---|---|
| id | The Id of the databricks virtual network. | string |
VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork
| Name | Description | Value |
|---|---|---|
| id | The Id of the remote virtual network. | string |
Usage Examples
Terraform (AzAPI provider) resource definition
The workspaces/virtualNetworkPeerings resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Databricks/workspaces/virtualNetworkPeerings resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Databricks/workspaces/virtualNetworkPeerings@2026-01-01"
name = "string"
parent_id = "string"
body = {
properties = {
allowForwardedTraffic = bool
allowGatewayTransit = bool
allowVirtualNetworkAccess = bool
databricksAddressSpace = {
addressPrefixes = [
"string"
]
}
databricksVirtualNetwork = {
id = "string"
}
remoteAddressSpace = {
addressPrefixes = [
"string"
]
}
remoteVirtualNetwork = {
id = "string"
}
useRemoteGateways = bool
}
}
}
Property Values
Microsoft.Databricks/workspaces/virtualNetworkPeerings
| Name | Description | Value |
|---|---|---|
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: workspaces |
| properties | List of properties for vNet Peering | VirtualNetworkPeeringPropertiesFormat (required) |
| type | The resource type | "Microsoft.Databricks/workspaces/virtualNetworkPeerings@2026-01-01" |
AddressSpace
| Name | Description | Value |
|---|---|---|
| addressPrefixes | A list of address blocks reserved for this virtual network in CIDR notation. | string[] |
VirtualNetworkPeeringPropertiesFormat
| Name | Description | Value |
|---|---|---|
| allowForwardedTraffic | Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. | bool |
| allowGatewayTransit | If gateway links can be used in remote virtual networking to link to this virtual network. | bool |
| allowVirtualNetworkAccess | Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. | bool |
| databricksAddressSpace | The reference to the databricks virtual network address space. | AddressSpace |
| databricksVirtualNetwork | The remote virtual network should be in the same region. See here to learn more (/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). | VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork |
| remoteAddressSpace | The reference to the remote virtual network address space. | AddressSpace |
| remoteVirtualNetwork | The remote virtual network should be in the same region. See here to learn more (/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). | VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork (required) |
| useRemoteGateways | If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. | bool |
VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork
| Name | Description | Value |
|---|---|---|
| id | The Id of the databricks virtual network. | string |
VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork
| Name | Description | Value |
|---|---|---|
| id | The Id of the remote virtual network. | string |
Usage Examples
Terraform Samples
A basic example of deploying Databricks Virtual Network Peering.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
data "azapi_resource_id" "workspace_resource_group" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
parent_id = azapi_resource.resourceGroup.parent_id
name = "databricks-rg-${var.resource_name}"
}
resource "azapi_resource" "workspace" {
type = "Microsoft.Databricks/workspaces@2023-02-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
managedResourceGroupId = data.azapi_resource_id.workspace_resource_group.id
publicNetworkAccess = "Enabled"
}
sku = {
name = "standard"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "virtualNetwork" {
type = "Microsoft.Network/virtualNetworks@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
addressSpace = {
addressPrefixes = [
"10.0.1.0/24",
]
}
dhcpOptions = {
dnsServers = [
]
}
subnets = [
]
}
}
schema_validation_enabled = false
response_export_values = ["*"]
lifecycle {
ignore_changes = [body.properties.subnets]
}
}
resource "azapi_resource" "virtualNetworkPeering" {
type = "Microsoft.Databricks/workspaces/virtualNetworkPeerings@2023-02-01"
parent_id = azapi_resource.workspace.id
name = var.resource_name
body = {
properties = {
allowForwardedTraffic = false
allowGatewayTransit = false
allowVirtualNetworkAccess = true
databricksAddressSpace = {
addressPrefixes = [
"10.139.0.0/16",
]
}
remoteAddressSpace = {
addressPrefixes = [
"10.0.1.0/24",
]
}
remoteVirtualNetwork = {
id = azapi_resource.virtualNetwork.id
}
useRemoteGateways = false
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}