azure - 在Azure中的应用程序网关的ARM中获取动态IP

标签 azure azure-application-gateway

我们可以在应用程序网关分配公共(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/

相关文章:

Azure 应用程序网关返回 502 错误网关 - 运行状况检查和网络正常

c# - 表 __MigrationHistory 未更新

azure - 从 Azure Purview 查询数据

azure - MS 逻辑应用程序 : Add File to SharePoint trigger inconsistent

python - 使用 AzureMachineLearningFileSystem 更新时出现 NotImplementedError

azure - 使用 Azure 应用程序网关阻止所有 http/https 流量的 WAF 规则

azure - 在应用服务前面配置WAF应用程序网关

azure - Azure 应用程序网关 cookie 可以替换为应用程序 cookie 吗?

azure - 我应该如何组织具有多个 Azure Functions 的解决方案?

azure - 应用程序网关 URL 路由到多个应用程序服务