Improve dns

This commit is contained in:
Tobias Reisinger 2024-10-02 00:24:11 +02:00
parent 48a4f72e4f
commit 5d10e75ade
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 41 additions and 19 deletions

View file

@ -1,69 +1,89 @@
{
"*": {
"catch-all-serguzim.me": {
"target": "*",
"domain": "serguzim.me",
"host": "node002"
},
"auth": {
"acme_dns": {
"target": "acme",
"domain": "serguzim.me",
"host": "node003"
},
"authentik": {
"target": "auth",
"domain": "serguzim.me",
"host": "node002"
},
"faas": {
"openfaas": {
"target": "faas",
"domain": "serguzim.me",
"host": "node002"
},
"mail": {
"mailcow": {
"target": "mail",
"domain": "serguzim.me",
"host": "node003"
},
"matrix": {
"synapse": {
"target": "matrix",
"domain": "serguzim.me",
"host": "node002"
},
"s3": {
"linkwarden": {
"target": "bookmarks",
"domain": "serguzim.me",
"host": "node003"
},
"minio": {
"target": "s3",
"domain": "serguzim.me",
"host": "node002"
},
"s3-console": {
"minio-console": {
"target": "console.s3",
"domain": "serguzim.me",
"alias": "s3"
"alias": "minio"
},
"serguzim.me": {
"umami": {
"target": "analytics",
"domain": "serguzim.me",
"host": "node003"
},
"webpage-serguzim.me": {
"target": "@",
"domain": "serguzim.me",
"alias": "faas"
"alias": "openfaas"
},
"wiki_js": {
"target": "wiki",
"domain": "serguzim.me",
"host": "node003"
},
"matrix_msrg": {
"synapse_msrg.cc": {
"target": "matrix",
"domain": "msrg.cc",
"alias": "matrix"
"alias": "synapse"
},
"link": {
"shlink": {
"target": "@",
"domain": "msrg.cc",
"host": "node002"
},
"link_msvg": {
"shlink-msvg.cc": {
"target": "@",
"domain": "msvg.cc",
"alias": "link"
"alias": "shlink"
},
"reitanlage": {
"reitanlage_oranienburg": {
"target": "@",
"domain": "reitanlage-oranienburg.de",
"host": "node002"
},
"reitanlage_www": {
"reitanlage_oranienburg-www": {
"target": "www",
"domain": "reitanlage-oranienburg.de",
"alias": "reitanlage"
"alias": "reitanlage_oranienburg"
}
}

View file

@ -85,7 +85,7 @@ D("serguzim.me", REG_OVH, DnsProvider(DSP_OVH),
"reitanlage-oranienburg.de"
]),
NS("acme", "node002.serguzim.net."),
NS("acme", services["acme_dns"].resolve_host().fqdn + "."),
CNAME("db", "node002.vpn.serguzim.net."),

View file

@ -2,6 +2,8 @@ output "hosts" {
value = {
for subdomain in distinct([for record in ovh_domain_zone_record.server_records : record.subdomain]) :
subdomain => {
"hostname" = subdomain
"fqdn" = "${subdomain}.${ovh_domain_zone_record.server_records["${subdomain}:ipv4"].zone}"
"ipv4_address" = try(
ovh_domain_zone_record.server_records["${subdomain}:ipv4"].target,
null