From 90e54d7292bde52e9666637843e6e816ce46722a Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Wed, 10 Jul 2024 00:55:42 +0200 Subject: [PATCH] terraform: add DNS records for VPN-GW & builders Signed-off-by: Raito Bezarius --- terraform/gandi.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/terraform/gandi.nix b/terraform/gandi.nix index 52c3640..82f7ffd 100644 --- a/terraform/gandi.nix +++ b/terraform/gandi.nix @@ -1,6 +1,6 @@ { lib, config, ... }: let - inherit (lib) mkEnableOption mkIf tf; + inherit (lib) mkEnableOption mkIf tf genList; cfg = config.bagel.gandi; in { @@ -43,7 +43,7 @@ in }; }) records); - in forkosRecords [ + in forkosRecords ([ # (record "@" 3600 "A" ["163.172.69.160"]) (record "@" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"]) @@ -67,6 +67,9 @@ in (record "loki" 3600 "CNAME" ["meta01.infra"]) (record "mimir" 3600 "CNAME" ["meta01.infra"]) (record "matrix" 3600 "CNAME" ["meta01.infra"]) - ]; + + (record "vpn-gw.wob01.infra" 3600 "AAAA" [ "2a01:584:11::2" ]) + # TODO: do not hardcode, just reuse the Colmena hive module outputs to generate all the required details. + ] ++ map (index: record "builder-${toString index}.wob01.infra" 3600 "AAAA" [ "2a01:584:11::1:${toString index}" ]) (genList lib.id 12)); }; }