{"id":21303068,"url":"https://github.com/bzon/azureip2tfvars","last_synced_at":"2026-05-09T19:39:44.205Z","repository":{"id":141940498,"uuid":"156617136","full_name":"bzon/azureip2tfvars","owner":"bzon","description":"Create Terraform list variables from Azure data centre IPs.","archived":false,"fork":false,"pushed_at":"2018-11-10T00:33:25.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T08:28:30.451Z","etag":null,"topics":["azure","devops","golang","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bzon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-07T22:33:09.000Z","updated_at":"2018-11-10T00:33:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"7edb38f0-9de6-4f6f-9d74-86effa740f30","html_url":"https://github.com/bzon/azureip2tfvars","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzon%2Fazureip2tfvars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzon%2Fazureip2tfvars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzon%2Fazureip2tfvars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzon%2Fazureip2tfvars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bzon","download_url":"https://codeload.github.com/bzon/azureip2tfvars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243776693,"owners_count":20346353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","devops","golang","terraform"],"created_at":"2024-11-21T15:58:49.198Z","updated_at":"2026-05-09T19:39:39.164Z","avatar_url":"https://github.com/bzon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/bzon/azureip2tfvars.svg?branch=master)](https://travis-ci.org/bzon/azureip2tfvars)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bzon/azureip2tfvars)](https://goreportcard.com/report/github.com/bzon/azureip2tfvars)\n\n## Synopsis\n\nIf your team is using Azure services like Bots that calls some APIs from your server, \nyou probably want to whitelist specific Azure IP addressess for security purposes.\n\nIn order to do that, you can go to https://www.microsoft.com/en-gb/download/details.aspx?id=41653 \nand download the XML file from there. The problem is, the IP ranges may change on a regular basis \nand if you are using infra as code tools such as Terraform, you need to find an easy way to automate \nthis task and update your Terraform variables.\n\n**azureip2tfvars** is created to easily extract the latest Azure Data Centre IPs and create a \nTerraform variables file out of it. We use Terraform to create AWS security groups with ingress rules that whitelist these Azure data centre IP's. \n**azureip2tfvars** lets our team update our `tf` files on a regular basis easily to keep our ingress rules up to date.\n\n## Quickstart\n\nDownload the latest binary for your Operating System from the [releases page](https://github.com/bzon/azureip2tfvars/releases/) and place it to your preferred directory or folder.\n\n**From the command line terminal**\n\n```bash\n# for linux or macos\nexport PATH=$PATH:/directory/of/the/binary\n\nazureip2tfvars -writeto /tmp/vars.tf\n```\n\n```bash\n# for windows\nSET PATH=%PATH%;C:\\directory\\of\\the\\binary\n\nazureip2tfvars.exe -writeto /tmp/vars.tf\n```\n\n**Command example output**\n\n```bash\n⡿ Download url is: https://download.microsoft.com/download/0/1/8/018E208D-54F8-44CD-AA26-CD7BC9524A8C/PublicIPs_20181107.xml\nTerraform file \"/tmp/vars.tf\" successfully created!\n```\n\n**Terraform file**\n\n```go\n...\n\nvariable \"azure_indiawest_subnets\" {\n    type = \"list\"\n    default = [\n    \"20.40.8.0/21\",\n    \"20.190.146.128/25\",\n    \"40.79.219.0/24\",\n    \"40.81.80.0/20\",\n    \"40.87.220.0/22\",\n    \"40.90.138.224/27\",\n    \"40.126.18.128/25\",\n    \"52.109.64.0/22\",\n    \"52.114.28.0/22\",\n    \"52.136.16.0/24\",\n    \"52.136.32.0/19\",\n    \"52.140.128.0/18\",\n    \"52.183.128.0/18\",\n    \"52.239.135.192/26\",\n    \"52.239.187.128/25\",\n    \"52.245.76.0/22\",\n    \"52.249.64.0/19\",\n    \"104.44.93.224/27\",\n    \"104.44.95.112/28\",\n    \"104.47.212.0/23\",\n    \"104.211.128.0/18\",\n    ]\n}\n\nvariable \"azure_uswest2_subnets\" {\n...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzon%2Fazureip2tfvars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbzon%2Fazureip2tfvars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzon%2Fazureip2tfvars/lists"}