terraform: add DNS records for VPN-GW & builders

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
raito 2024-07-10 00:55:42 +02:00
parent 645ad7d062
commit 90e54d7292

View file

@ -1,6 +1,6 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkEnableOption mkIf tf; inherit (lib) mkEnableOption mkIf tf genList;
cfg = config.bagel.gandi; cfg = config.bagel.gandi;
in in
{ {
@ -43,7 +43,7 @@ in
}; };
}) records); }) records);
in forkosRecords [ in forkosRecords ([
# (record "@" 3600 "A" ["163.172.69.160"]) # (record "@" 3600 "A" ["163.172.69.160"])
(record "@" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"]) (record "@" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"])
@ -67,6 +67,9 @@ in
(record "loki" 3600 "CNAME" ["meta01.infra"]) (record "loki" 3600 "CNAME" ["meta01.infra"])
(record "mimir" 3600 "CNAME" ["meta01.infra"]) (record "mimir" 3600 "CNAME" ["meta01.infra"])
(record "matrix" 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));
}; };
} }