我有一个 Arm 模板,其中有一个带有 2 个子网的 vNet。我正在尝试使用静态专用 IP 地址将网卡部署到其中之一。它曾经是动态的,并且运行良好。现在它是静态的,我已经设置了我想要网卡拥有的IP,但是当我部署时,它说IP无效。我尝试更改我设置的IP,但仍然不起作用...
从我的模板中摘录:(subnetPart 是一个参数化数字,因为我们有多个要连接的 vnet,但子网不需要冲突)
variables
"virtualNetworkRange": "[concat('10.', parameters('subnetPart'), '.10.0/26')]",
"ssrsSubnetRange": "[concat('10.', parameters('subnetPart'), '.10.8/29')]",
"ssrsPrivateIP": "[concat('10.', parameters('subnetPart'), '.10.10')]",
resources
{
"name": "[variables('ExternalServicesVNET')]",
"type": "Microsoft.Network/virtualNetworks",
"location": "[resourceGroup().location]",
"apiVersion": "2015-05-01-preview",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('virtualNetworkRange')]"
]
},
"subnets": [
{
"name": "[variables('jumpSubnetName')]",
"properties": {
"addressPrefix": "[variables('jumpSubnetRange')]"
}
},
{
"name": "[variables('ssrsSubnetName')]",
"properties": {
"addressPrefix": "[variables('ssrsSubnetRange')]"
}
}
]
}
},
{
"name": "[variables('SSRSvmNicName')]",
"type": "Microsoft.Network/networkInterfaces",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [
"[concat('Microsoft.Network/virtualNetworks/', variables('ExternalServicesVNET'))]"
], …Run Code Online (Sandbox Code Playgroud) subnet azure static-ip-address azure-resource-manager azure-rm-template