Microsoft.Network virtualNetworks/virtualNetworkPeerings 2021-02-01
The virtualNetworks/virtualNetworkPeerings resource type can be deployed to: Resource groups.
To learn about resource group deployments, see Bicep or ARM template.
Template format
To create a Microsoft.Network/virtualNetworks/virtualNetworkPeerings resource, add the following Bicep or JSON to your template.
resource symbolicname 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings@2021-02-01' = {
name: 'string'
parent: resourceSymbolicName
properties: {
allowForwardedTraffic: bool
allowGatewayTransit: bool
allowVirtualNetworkAccess: bool
doNotVerifyRemoteGateways: bool
peeringState: 'string'
peeringSyncLevel: 'string'
remoteAddressSpace: {
addressPrefixes: [
'string'
]
}
remoteBgpCommunities: {
virtualNetworkCommunity: 'string'
}
remoteVirtualNetwork: {
id: 'string'
}
remoteVirtualNetworkAddressSpace: {
addressPrefixes: [
'string'
]
}
useRemoteGateways: bool
}
}
Property values
virtualNetworks/virtualNetworkPeerings
Name | Description | Value |
---|---|---|
type | The resource type For Bicep, set this value in the resource declaration. |
'Microsoft.Network/virtualNetworks/virtualNetworkPeerings' |
apiVersion | The resource api version For Bicep, set this value in the resource declaration. |
'2021-02-01' |
name | The resource name See how to set names and types for child resources in Bicep or JSON ARM templates. |
string (required) Character limit: 1-80 Valid characters: Alphanumerics, underscores, periods, and hyphens. Start with alphanumeric. End alphanumeric or underscore. |
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: virtualNetworks |
properties | Properties of the virtual network peering. | VirtualNetworkPeeringPropertiesFormat |
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 |
doNotVerifyRemoteGateways | If we need to verify the provisioning state of the remote gateway. | bool |
peeringState | The status of the virtual network peering. | 'Connected' 'Disconnected' 'Initiated' |
peeringSyncLevel | The peering sync status of the virtual network peering. | 'FullyInSync' 'LocalAndRemoteNotInSync' 'LocalNotInSync' 'RemoteNotInSync' |
remoteAddressSpace | AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. | AddressSpace |
remoteBgpCommunities | Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. | VirtualNetworkBgpCommunities |
remoteVirtualNetwork | Reference to another subresource. | SubResource |
remoteVirtualNetworkAddressSpace | AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. | AddressSpace |
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 |
AddressSpace
Name | Description | Value |
---|---|---|
addressPrefixes | A list of address blocks reserved for this virtual network in CIDR notation. | string[] |
VirtualNetworkBgpCommunities
Name | Description | Value |
---|---|---|
virtualNetworkCommunity | The BGP community associated with the virtual network. | string (required) |
SubResource
Name | Description | Value |
---|---|---|
id | Resource ID. | string |
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Deploy a Hub and Spoke topology sandbox |
This template creates a basic hub-and-spoke topology setup. It creates a Hub VNet with subnets DMZ, Management, Shared and Gateway (optionally), with two Spoke VNets (development and production) containing a workload subnet each. It also deploys a Windows Jump-Host on the Management subnet of the HUB, and establishes VNet peerings between the Hub and the two spokes. |
Deploy HBase replication with two VNets in one region |
This template allows you to configure aN HBase environment with two HBase clusters within two VNets in the same region for configuring HBase replication. |
Use Azure Firewall as a DNS Proxy in a Hub & Spoke topology |
This sample show how to deploy a hub-spoke topology in Azure using the Azure Firewall. The hub virtual network acts as a central point of connectivity to many spoke virtual networks that are connected to hub virtual network via virtual network peering. |
Create an Azure Firewall sandbox with forced tunneling |
This template creates an Azure Firewall sandbox (Linux) with one firewall force tunneled through another firewall in a peered VNET |
Deploy a Bastion host in a hub Virtual Network |
This template creates two vNets with peerings, a Bastion host in the Hub vNet and a Linux VM in the spoke vNet |
Peer two existing VNets within a single region |
This template allows you to connect two VNETs from the same or different resource groups in the same region using VNet Peering |
Create a vNet to vNet connection using vNet Peering |
This template allows you to connect two vNets using vNet Peering |