我们可以在应用程序网关分配公共(public) IP 地址后在输出中提取动态分配的公共(public) IP 地址吗?静态地址工作正常。
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2019-04-01",
"name": "[variables('publicIpName')]",
"location": "[resourceGroup().location]",
"condition": "[variables('usePublicIp')]",
"properties": {
"publicIPAllocationMethod": "Dynamic"
}
},
"outputs": {
"IpAddress": {
"type": "String",
"value": "reference(variables('publicIpName')).IpAddress]"
}
}
错误:
最佳答案
这个github issue解决与您相同的问题。
有一个技巧可以解决这个问题,这个模板可以帮助您了解如何解决:https://github.com/Azure/azure-quickstart-templates/tree/master/201-application-gateway-webapp-iprestriction
希望这有帮助!
关于azure - 在Azure中的应用程序网关的ARM中获取动态IP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60650243/