1
0
Fork 0
Go to file
renovate[bot] 5324ff3f32 update: update module github.com/aws/aws-sdk-go to v1.44.198 2023-02-09 21:27:00 -06:00
scripts feat(build): github status jobs 2020-04-05 23:04:28 -05:00
.gitignore use dep for dependencies, update build 2018-03-10 10:25:15 -06:00
.gitlab-ci.yml feat(build): upgrade docker to 20 with TLS 2021-08-05 22:51:41 -05:00
Dockerfile.ubuntu update: update apextoaster/base docker tag to v1.5 2021-08-05 17:02:46 -05:00
LICENSE Initial commit 2018-01-21 14:47:47 -06:00
Makefile fix(build): correct artifact names 2020-04-06 08:53:21 -05:00
README.md dynamic executable name in usage, fix config example 2018-01-21 18:11:23 -06:00
go.mod update: update module github.com/aws/aws-sdk-go to v1.44.198 2023-02-09 21:27:00 -06:00
go.sum update: update module github.com/aws/aws-sdk-go to v1.44.198 2023-02-09 21:27:00 -06:00
main.go update: update module robfig/cron to v3 (#7) 2020-04-19 16:10:42 -05:00
main_test.go run go tests 2018-03-31 09:52:12 -05:00
renovate.json fix: move renovate branches to update type 2020-04-05 23:20:34 -05: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