os/terraform/h.net.tf

90 lines
2.2 KiB
HCL

locals {
domain = join("", ["hw", "dz", "z.", "net"])
}
resource "hostingde_zone" "hz" {
name = local.domain
type = "NATIVE"
}
resource "hostingde_record" "hz-AAAA" {
zone_id = hostingde_zone.hz.id
name = local.domain
type = "AAAA"
content = "2a01:4f8:c2c:b60::"
ttl = 300
}
resource "hostingde_record" "hz-A" {
zone_id = hostingde_zone.hz.id
name = local.domain
type = "A"
content = "128.140.109.213"
ttl = 300
}
resource "hostingde_record" "hz-mail" {
zone_id = hostingde_zone.hz.id
name = "mail.${local.domain}"
type = "CNAME"
content = local.domain
ttl = 300
}
resource "hostingde_record" "hz-autoconfig" {
zone_id = hostingde_zone.hz.id
name = "autoconfig.${local.domain}"
type = "CNAME"
content = "mail.${local.domain}"
ttl = 300
}
resource "hostingde_record" "hz-autodiscover" {
zone_id = hostingde_zone.hz.id
name = "autodiscover.${local.domain}"
type = "CNAME"
content = "mail.${local.domain}"
ttl = 300
}
resource "hostingde_record" "hz-mx" {
zone_id = hostingde_zone.hz.id
name = local.domain
type = "MX"
content = "mail.${local.domain}"
priority = 10
ttl = 300
}
resource "hostingde_record" "hz-mta-sts" {
zone_id = hostingde_zone.hz.id
name = "mta-sts.${local.domain}"
type = "CNAME"
content = local.domain
ttl = 300
}
resource "hostingde_record" "hz-spf" {
zone_id = hostingde_zone.hz.id
name = local.domain
type = "TXT"
content = "v=spf1 a:mail.${local.domain} -all"
ttl = 300
}
resource "hostingde_record" "hz-dkim" {
zone_id = hostingde_zone.hz.id
name = "default._domainkey.${local.domain}"
type = "TXT"
content = "v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyla9hW3TvoXvZQxwzaJ4SZ9ict1HU3E6+FWlwNIgE6tIpTCyRJtiSIUDqB8TLTIBoxIs+QQBXZi+QUi3Agu6OSY2RiV0EwO8+oOOqOD9pERftc/aqe51cXuv4kPqwvpXEBwrXFWVM+VxivEubUJ7eKkFyXJpelv0LslXv/MmYbUyed6dF+reOGZCsvnbiRv74qdxbAL/25j62E8WrnxzJwhUtx/JhdBOjsHBvuw9hy6rZsVJL9eXayWyGRV6qmsLRzsRSBs+mDrgmKk4dugADd11+A03ics3i8hplRoWDkqnNKz1qy4f5TsV6v9283IANrAzRfHwX8EvNiFsBz+ZCQIDAQAB"
ttl = 300
}
resource "hostingde_record" "hz-dmarc" {
zone_id = hostingde_zone.hz.id
name = "_dmarc.${local.domain}"
type = "TXT"
content = "v=DMARC1;p=none;"
ttl = 300
}