我正在尝试在新订阅中创建辐条 vnet,并尝试通过 ARM 模板与另一个订阅中已经存在的集线器 vnet 对等。做这个的最好方式是什么?您如何引用 Hub vnet?
这就是我引用集线器 vnet 的方式,但没有运气:
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"name": "nestedTemplate",
"resourceGroup": "[parameters('secondResourceGroup')]",
"subscriptionId": "[parameters('secondSubscriptionID')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
"type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings",
"apiVersion": "2019-11-01",
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": true,
"useRemoteGateways": false,
"remoteVirtualNetwork": "r_name",
"remoteAddressSpace": {
"addressPrefixes": "CIDR_spcae"
}
]
},