add metrics.clan.lol
All checks were successful
checks / test (pull_request) Successful in 40s

This commit is contained in:
Jörg Thalheim 2024-04-13 16:08:20 +02:00
parent 8768b6a117
commit ccd3a8b976
2 changed files with 11 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,20 +1,13 @@
locals {
subhostnames = [
hostnames = [
"@",
"git",
"mail",
"cache",
"matrix",
"www",
"docs"
]
hostnames = [
var.hostname,
"www.${var.hostname}",
"git.${var.hostname}",
"mail.${var.hostname}",
"cache.${var.hostname}",
"matrix.${var.hostname}",
"docs",
"metrics"
]
}
@ -24,7 +17,7 @@ resource "hetznerdns_zone" "server" {
}
resource "hetznerdns_record" "server_a" {
for_each = toset(local.subhostnames)
for_each = toset(local.hostnames)
zone_id = hetznerdns_zone.server.id
name = each.value
type = "A"
@ -32,7 +25,7 @@ resource "hetznerdns_record" "server_a" {
}
resource "hetznerdns_record" "server_aaaa" {
for_each = toset(local.subhostnames)
for_each = toset(local.hostnames)
zone_id = hetznerdns_zone.server.id
name = each.value
type = "AAAA"