about summary refs log tree commit diff
path: root/users/tazjin/dns/import
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/dns/import')
-rwxr-xr-xusers/tazjin/dns/import12
1 files changed, 12 insertions, 0 deletions
diff --git a/users/tazjin/dns/import b/users/tazjin/dns/import
new file mode 100755
index 000000000000..8ea1d694c9a1
--- /dev/null
+++ b/users/tazjin/dns/import
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -ue
+
+# Imports a zone file into Google Cloud DNS
+readonly ZONE="${1}"
+readonly FILE="${2}"
+
+gcloud dns record-sets import "${FILE}" \
+       --project composite-watch-759 \
+       --zone-file-format \
+       --delete-all-existing \
+       --zone "${ZONE}"