Use Route53 for dynamic DNS.
Reads record name and zone from a YAML config and upserts on schedule.
go get
go buildThe config file should have a source endpoint and each record to be updated:
source: "https://api.ipify.org?format=text"
records:
- cron: "@hourly"
name: home.example.com.
ttl: 300
zone: Z1ABCDEF123456
- cron: "@daily"
name: office.example.com.
ttl: 86400
zone: Z1ABCDEF123456Execute with the config file:
AWS_PROFILE="home-root" ./home-dns config.ymlI do not know Go very well at all, so this code may be quite bad.
- multiple zones and records
- update on cron schedule
- cache the external address (on a schedule of its own?)
- interface selection for external check