diff options
Diffstat (limited to 'ops')
-rw-r--r-- | ops/glesys/dns-tvl-fyi.tf | 14 | ||||
-rw-r--r-- | ops/glesys/dns-tvl-su.tf | 14 | ||||
-rw-r--r-- | ops/glesys/main.tf | 19 |
3 files changed, 33 insertions, 14 deletions
diff --git a/ops/glesys/dns-tvl-fyi.tf b/ops/glesys/dns-tvl-fyi.tf index 803bfeae08ba..26105e9fdc38 100644 --- a/ops/glesys/dns-tvl-fyi.tf +++ b/ops/glesys/dns-tvl-fyi.tf @@ -53,13 +53,13 @@ resource "glesys_dnsdomain_record" "tvl_fyi_whitby_AAAA" { data = var.whitby_ipv6 } -# This record is responsible for hosting ~all TVL services. Be -# mindful! -resource "glesys_dnsdomain_record" "tvl_fyi_wildcard" { - domain = glesys_dnsdomain.tvl_fyi.id - host = "*" - type = "CNAME" - data = "whitby.tvl.fyi." +# Explicit records for all services running on whitby +resource "glesys_dnsdomain_record" "tvl_fyi_whitby_services" { + domain = glesys_dnsdomain.tvl_fyi.id + type = "CNAME" + data = "whitby.tvl.fyi." + host = each.key + for_each = toset(local.whitby_services) } # Google Domains mail forwarding configuration (no sending) diff --git a/ops/glesys/dns-tvl-su.tf b/ops/glesys/dns-tvl-su.tf index 39fd054e01dd..f7f68cc5f995 100644 --- a/ops/glesys/dns-tvl-su.tf +++ b/ops/glesys/dns-tvl-su.tf @@ -67,13 +67,13 @@ resource "glesys_dnsdomain_record" "tvl_su_sanduny_AAAA" { data = var.sanduny_ipv6 } -# This record is responsible for hosting ~all TVL services. Be -# mindful! -resource "glesys_dnsdomain_record" "tvl_su_wildcard" { - domain = glesys_dnsdomain.tvl_su.id - host = "*" - type = "CNAME" - data = "whitby.tvl.su." +# Explicit records for all services running on whitby +resource "glesys_dnsdomain_record" "tvl_su_whitby_services" { + domain = glesys_dnsdomain.tvl_su.id + type = "CNAME" + data = "whitby.tvl.su." + host = each.key + for_each = toset(local.whitby_services) } resource "glesys_dnsdomain_record" "tvl_su_TXT_google_site" { diff --git a/ops/glesys/main.tf b/ops/glesys/main.tf index 9452971054aa..cd5ea9f4fd34 100644 --- a/ops/glesys/main.tf +++ b/ops/glesys/main.tf @@ -66,3 +66,22 @@ variable "sanduny_ipv6" { type = string default = "2001:ba8:1f1:f109::feed:edef:beef" } + +locals { + # Hostnames of all public services on whitby + whitby_services = [ + "at", + "atward", + "auth", + "b", + "cache", + "cl", + "code", + "cs", + "deploys", + "images", + "static", + "status", + "todo", + ] +} |