Created
May 31, 2021 15:06
-
-
Save gbaeke/713f0ea14e27ac89e298f4119d560d62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource vnet1 'Microsoft.Network/virtualNetworks@2020-11-01' = { | |
name: 'vnet1' | |
location: resourceGroup().location | |
properties: { | |
addressSpace: { | |
addressPrefixes: [ | |
'10.0.10.0/24' | |
] | |
} | |
subnets:[ | |
{ | |
name: 'servers' | |
properties:{ | |
addressPrefix: '10.0.10.0/25' | |
} | |
} | |
] | |
} | |
} | |
resource vnet2 'Microsoft.Network/virtualNetworks@2020-11-01' = { | |
name: 'vnet2' | |
location: resourceGroup().location | |
properties: { | |
addressSpace: { | |
addressPrefixes: [ | |
'10.0.11.0/24' | |
] | |
} | |
subnets:[ | |
{ | |
name: 'servers' | |
properties:{ | |
addressPrefix: '10.0.11.0/25' | |
} | |
} | |
] | |
} | |
} | |
resource peer_vnet1_vnet2 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings@2020-11-01' = { | |
name: 'peer_vnet1_vnet2' | |
parent: vnet1 | |
dependsOn:[ | |
vnet1 | |
vnet2 | |
] | |
properties:{ | |
remoteVirtualNetwork: { | |
id: vnet2.id | |
} | |
allowVirtualNetworkAccess: true | |
} | |
} | |
resource peer_vnet2_vnet1 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings@2020-11-01' = { | |
name: 'peer_vnet2_vnet1' | |
parent: vnet2 | |
dependsOn:[ | |
vnet1 | |
vnet2 | |
] | |
properties:{ | |
remoteVirtualNetwork: { | |
id: vnet1.id | |
} | |
allowVirtualNetworkAccess: true | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment