我正在尝试在创建路由表时将路由表分配给子网/Vnet。我找不到要添加到脚本中的脚本/属性。有人可以帮我解决这个问题。我正在尝试在创建路由表时将路由表分配给子网/Vnet。我找不到要添加到脚本中的脚本/属性。有人可以帮我解决这个问题。
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"name": {
"type": "string"
},
"disableBgpRoutePropagation": {
"type": "string"
},
"Spoke2AddressPrefix" :{
"type": "string"
},
"HopIpaddress" : {
"type": "string"
},
"VnetRGName" : {
"type": "string"
},
"VnetName" : {
"type": "string"
},
"SubnetName" : {
"type": "string"
}
},
"resources": [
{
"name": "[parameters('name')]",
"type": "Microsoft.Network/routeTables",
"apiVersion": "2018-08-01",
"location": "[parameters('location')]",
"dependsOn": [],
"properties": {
"disableBgpRoutePropagation": "[parameters('disableBgpRoutePropagation')]",
"routes": [
{
"name": "Spoke1-Hub",
"id" : "[concat(resourceId( parameters('VnetRGName'), 'Microsoft.Network/virtualNetworks', parameters('Vnetname')), 'Microsoft.Network/virtualNetworks/subnets', parameters('subnetname'))]",
"properties": {
"addressPrefix": "[parameters('Spoke2AddressPrefix')]",
"nextHopType": "VirtualAppliance",
"nextHopIpAddress": "[parameters('HopIpaddress')]"
}
}
]
}
}
]
}