forked from clan/clan-infra
add dns wildcard for clan.lol
This commit is contained in:
parent
ae636eb267
commit
ab6c39c77e
@ -1,34 +1,32 @@
|
|||||||
locals {
|
|
||||||
hostnames = [
|
|
||||||
"@",
|
|
||||||
"git",
|
|
||||||
"mail",
|
|
||||||
"cache",
|
|
||||||
"matrix",
|
|
||||||
"www",
|
|
||||||
"docs",
|
|
||||||
"metrics",
|
|
||||||
"buildbot"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "hetznerdns_zone" "server" {
|
resource "hetznerdns_zone" "server" {
|
||||||
name = var.dns_zone
|
name = var.dns_zone
|
||||||
ttl = 3600
|
ttl = 3600
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "hetznerdns_record" "server_a" {
|
resource "hetznerdns_record" "root_a" {
|
||||||
for_each = toset(local.hostnames)
|
|
||||||
zone_id = hetznerdns_zone.server.id
|
zone_id = hetznerdns_zone.server.id
|
||||||
name = each.value
|
name = "@"
|
||||||
type = "A"
|
type = "A"
|
||||||
value = var.ipv4_address
|
value = var.ipv4_address
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "hetznerdns_record" "server_aaaa" {
|
resource "hetznerdns_record" "root_aaaa" {
|
||||||
for_each = toset(local.hostnames)
|
|
||||||
zone_id = hetznerdns_zone.server.id
|
zone_id = hetznerdns_zone.server.id
|
||||||
name = each.value
|
name = "@"
|
||||||
|
type = "AAAA"
|
||||||
|
value = var.ipv6_address
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "wildcard_a" {
|
||||||
|
zone_id = hetznerdns_zone.server.id
|
||||||
|
name = "*"
|
||||||
|
type = "A"
|
||||||
|
value = var.ipv4_address
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "hetznerdns_record" "wildcard_aaaa" {
|
||||||
|
zone_id = hetznerdns_zone.server.id
|
||||||
|
name = "*"
|
||||||
type = "AAAA"
|
type = "AAAA"
|
||||||
value = var.ipv6_address
|
value = var.ipv6_address
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user