terraform/gandi: introduce proxyRecords
for nicer
This commit is contained in:
parent
3a25c74ec2
commit
d00da13459
|
@ -29,6 +29,12 @@ in
|
|||
inherit name ttl type values;
|
||||
};
|
||||
|
||||
proxyRecords = name: ttl: type: values: [
|
||||
# kurisu.lahfa.xyz running a sniproxy:
|
||||
(record name ttl "A" ["163.172.69.160"])
|
||||
(record name ttl type values)
|
||||
];
|
||||
|
||||
# TODO: make less fragile and have actual unique and stable names
|
||||
canonicalName = record: let
|
||||
name = builtins.replaceStrings ["." "@"] ["_" "_root_"] record.name;
|
||||
|
@ -41,27 +47,22 @@ in
|
|||
value = record // {
|
||||
zone = tf.ref "resource.gandi_livedns_domain.forkos_org.id";
|
||||
};
|
||||
}) records);
|
||||
}) (lib.flatten records));
|
||||
|
||||
in forkosRecords ([
|
||||
# (record "@" 3600 "A" ["163.172.69.160"])
|
||||
(record "@" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"])
|
||||
|
||||
(record "cl" 3600 "A" ["163.172.69.160"]) # kurisu.lahfa.xyz running a sniproxy
|
||||
(record "cl" 3600 "AAAA" ["2001:bc8:38ee:100:1000::10"])
|
||||
(proxyRecords "cl" 3600 "AAAA" ["2001:bc8:38ee:100:1000::10"])
|
||||
|
||||
(record "fodwatch" 3600 "A" ["163.172.69.160"])
|
||||
(record "fodwatch" 3600 "AAAA" ["2001:bc8:38ee:100:1000::30"])
|
||||
(proxyRecords "fodwatch" 3600 "AAAA" ["2001:bc8:38ee:100:1000::30"])
|
||||
|
||||
(record "netbox" 3600 "A" ["163.172.69.160"])
|
||||
(record "netbox" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"])
|
||||
(proxyRecords "netbox" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"])
|
||||
|
||||
(record "meta01.infra" 3600 "A" ["163.172.69.160"]) # kurisu.lahfa.xyz running a sniproxy
|
||||
(record "bagel-box.infra" 3600 "A" ["163.172.69.160"]) # kurisu.lahfa.xyz running a sniproxy
|
||||
(record "bagel-box.infra" 3600 "AAAA" ["2001:bc8:38ee:100:100::1"])
|
||||
(record "gerrit01.infra" 3600 "AAAA" ["2001:bc8:38ee:100:1000::10"])
|
||||
(record "fodwatch.infra" 3600 "AAAA" ["2001:bc8:38ee:100:1000::30"])
|
||||
(record "meta01.infra" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"])
|
||||
(proxyRecords "bagel-box.infra" 3600 "AAAA" ["2001:bc8:38ee:100:100::1"])
|
||||
(proxyRecords "gerrit01.infra" 3600 "AAAA" ["2001:bc8:38ee:100:1000::10"])
|
||||
(proxyRecords "fodwatch.infra" 3600 "AAAA" ["2001:bc8:38ee:100:1000::30"])
|
||||
(proxyRecords "meta01.infra" 3600 "AAAA" ["2001:bc8:38ee:100:1000::20"])
|
||||
|
||||
(record "amqp" 3600 "CNAME" ["bagel-box.infra"])
|
||||
(record "grafana" 3600 "CNAME" ["meta01.infra"])
|
||||
|
|
Loading…
Reference in a new issue