os/terraform/h.net.tf

66 lines
1.3 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
}