/azure-privatednszone-sync

Script which sync A records from Azure Private DNS Zone to machine's host file

Primary LanguageShellApache License 2.0Apache-2.0

Azure Private DNS Zone Sync

Script which sync A records from Azure Private DNS Zone to machine's host file

This script helps in copying A records from Private DNS zones to /etc/hosts file

Prerequisites

  • Install JQ
  • Install HTTPie
  • Azure Account

Steps

  • Register app in Azure Portal with permission to read Private DNS Zone
  • Update and copy dns.config file to /path/to/some-directory/ path
  • Run setup-autorefresh.sh /path/to/some-directory/dns.config

Note

  • Auto refresh is configured to refresh every hour
  • dns.config file contains secret which should be kept in control in case access allows writes as well
  • Pull requests are welcome :)