aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-04-27 17:08:05 +0100
committerGravatar Joe Banks <[email protected]>2024-04-27 19:27:24 +0100
commitfd2d137b7b2c6e58806237e50cece2294d9c2e38 (patch)
treec5282fa8e71a30f67d0b5e60687b8b3bae4ac6b3
parentAdd .env files to gitignore (diff)
Add OctoDNS configuration and documentation
-rw-r--r--dns/README.md3
-rw-r--r--dns/production.yaml24
-rw-r--r--dns/requirements.txt2
3 files changed, 29 insertions, 0 deletions
diff --git a/dns/README.md b/dns/README.md
new file mode 100644
index 0000000..0e6d74a
--- /dev/null
+++ b/dns/README.md
@@ -0,0 +1,3 @@
+# DNS Management
+
+This folder manages DNS records across the zones we use. It uses [octodns](https://github.com/octodns/octodns) with the Cloudfare provider to push and synchronize zone records with the YAML files in the `zones` folder.
diff --git a/dns/production.yaml b/dns/production.yaml
new file mode 100644
index 0000000..bce3d0f
--- /dev/null
+++ b/dns/production.yaml
@@ -0,0 +1,24 @@
+---
+manager:
+ plan_outputs:
+ html:
+ class: octodns.provider.plan.PlanMarkdown
+
+providers:
+ zone_config:
+ class: octodns.provider.yaml.YamlProvider
+ directory: zones
+ default_ttl: 300
+ enforce_order: true
+ cloudflare:
+ class: octodns_cloudflare.CloudflareProvider
+ token: env/CLOUDFLARE_TOKEN
+ account_id: env/CLOUDFLARE_ACCOUNT_ID
+ pagerules: false
+
+zones:
+ '*':
+ sources:
+ - zone_config
+ targets:
+ - cloudflare
diff --git a/dns/requirements.txt b/dns/requirements.txt
new file mode 100644
index 0000000..288aa51
--- /dev/null
+++ b/dns/requirements.txt
@@ -0,0 +1,2 @@
+octodns
+octodns-cloudflare