1
votes

Can we extract the dynamically allocated public IP address in output after Application Gateway has allocated it, Working fine for Static one.

  {
            "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]"
        }
    }

Error :

1
Hi Atul, Were you able to solve your problem?Jagrati Modi

1 Answers

1
votes

This github issue addresses the same problem as yours.

There is a trick to solve the problem and this template can help you to understand how: https://github.com/Azure/azure-quickstart-templates/tree/master/201-application-gateway-webapp-iprestriction

Hope this helps!