1
0
Fork 0
Go to file
Sean Sube b1459d34ae update ci image to go 1.9 2018-02-04 23:10:13 -06:00
src/home-dns clean up ci manifest 2018-01-21 22:35:42 -06:00
.gitignore clean up ci manifest 2018-01-21 22:35:42 -06:00
.gitlab-ci.yml update ci image to go 1.9 2018-02-04 23:10:13 -06:00
Dockerfile clean up ci manifest 2018-01-21 22:35:42 -06:00
LICENSE Initial commit 2018-01-21 14:47:47 -06:00
README.md dynamic executable name in usage, fix config example 2018-01-21 18:11:23 -06:00

README.md

home-dns

Use Route53 for dynamic DNS.

Reads record name and zone from a YAML config and upserts on schedule.

Usage

Build

go get
go build

Config

The 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: Z1ABCDEF123456

Run

Execute with the config file:

AWS_PROFILE="home-root" ./home-dns config.yml

Disclaimer

I do not know Go very well at all, so this code may be quite bad.

Features

  • multiple zones and records
  • update on cron schedule

Roadmap

  • cache the external address (on a schedule of its own?)
  • interface selection for external check