Use *.internal.trails.cool wildcard for internal services
Add wildcard DNS record for *.internal.trails.cool (A + AAAA) so internal services don't leak hostnames in individual DNS entries. Move Grafana from grafana.trails.cool to grafana.internal.trails.cool. Future internal services just need a Caddy block — no DNS changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bff9ff04a4
commit
559f53d8fc
3 changed files with 21 additions and 2 deletions
|
|
@ -122,6 +122,25 @@ resource "hcloud_zone_rrset" "planner_aaaa" {
|
|||
records = [{ value = hcloud_server.trails.ipv6_address }]
|
||||
}
|
||||
|
||||
# Internal wildcard — all *.internal.trails.cool resolves to the server.
|
||||
# Caddy handles routing per-subdomain. No individual DNS entries needed
|
||||
# for internal services (Grafana, Prometheus, etc.)
|
||||
resource "hcloud_zone_rrset" "internal_wildcard_a" {
|
||||
zone = "trails.cool"
|
||||
name = "*.internal"
|
||||
type = "A"
|
||||
ttl = 300
|
||||
records = [{ value = hcloud_server.trails.ipv4_address }]
|
||||
}
|
||||
|
||||
resource "hcloud_zone_rrset" "internal_wildcard_aaaa" {
|
||||
zone = "trails.cool"
|
||||
name = "*.internal"
|
||||
type = "AAAA"
|
||||
ttl = 300
|
||||
records = [{ value = hcloud_server.trails.ipv6_address }]
|
||||
}
|
||||
|
||||
resource "hcloud_zone_rrset" "www_cname" {
|
||||
zone = "trails.cool"
|
||||
name = "www"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue