This script converts Azure IP ranges to a comma-separated list for use in firewall rules, e.g. gcloud compute firewall-rules
. The given scripts looks up AzureCloud.eastus2 IP ranges, that are also used by GitHub Actions to connect to the outside, but you can easily change the name of the ranges you want to look up.
Unfortunately Microsoft does not seem to provide a static direct link to the JSON, so the link may need updating every now and then.
I pulled the link from https://www.microsoft.com/en-us/download/details.aspx?id=56519.
- curl