Is there a way to get an entire list of available IPs for an Application Gateway available in a subnet? The frontent IP is dynamically assigned, but I need it to be static. BUT the IPs needs to be randomly chosed from the subnet the same way dynmically assigning it does. I'm looking for a way to get it dynamically and set it statically. The FrontEndIP Configuration is created before the New-AzureRmApplicationGateway but the IP itself isn't assigned until the Gateway is being deployed, so I can grab it before running the New cmdlet.
Options: After deployment, I was thinking I COULD create a public IP to associate my Listeners to temporarily, save the Private IP address, and then recreate it statically and reassociate my Listeners. Then I would delete the public IP, but I don't want public to be in the picture.
Then I was thinking I could get the list of available IPs FOR the gateway and pick one from the list. But I'm not sure what restrictions I have to consider when it comes to the gateway. How can I recreate what Azure does during dynamic deployment?
Edit: Currently working on a script for this. Looks like the Test-AzureRMPrivateIPAddressAvailability is reporting that the Private IP address used by a gateway is still available..