From b6d07cf91ab7ec9df91ac0c4dda9b88fc0a93c4d Mon Sep 17 00:00:00 2001 From: Noah Date: Fri, 26 Dec 2025 11:56:48 +0100 Subject: [PATCH] added avlabs records for email --- terraform/modules/dns/avii/main.tf | 3 ++- terraform/modules/dns/avlabs/main.tf | 40 +++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/terraform/modules/dns/avii/main.tf b/terraform/modules/dns/avii/main.tf index bf1a121..ced2947 100644 --- a/terraform/modules/dns/avii/main.tf +++ b/terraform/modules/dns/avii/main.tf @@ -14,4 +14,5 @@ terraform { resource "hcloud_zone" "avii" { name = "avii.ovh" mode = "primary" -} \ No newline at end of file +} + diff --git a/terraform/modules/dns/avlabs/main.tf b/terraform/modules/dns/avlabs/main.tf index 6017698..26cfb83 100644 --- a/terraform/modules/dns/avlabs/main.tf +++ b/terraform/modules/dns/avlabs/main.tf @@ -14,4 +14,42 @@ terraform { resource "hcloud_zone" "avlabs" { name = "avlabs.ovh" mode = "primary" -} \ No newline at end of file +} + +resource "hcloud_zone_rrset" "mx" { + zone = hcloud_zone.avlabs.name + name = "@" + type = "MX" + + records = [ + { value = "10 mx01.mail.icloud.com.", comment = "Apple Mail" }, + { value = "10 mx02.mail.icloud.com.", comment = "Apple Mail" }, + ] + + change_protection = false +} + +resource "hcloud_zone_rrset" "dkim" { + zone = hcloud_zone.avlabs.name + name = "sig1._domainkey" + type = "CNAME" + + records = [ + { value = "sig1.dkim.avlabs.ovh.at.icloudmailadmin.com.", comment = "Apple Mail" }, + ] + + change_protection = false +} + +resource "hcloud_zone_rrset" "txt" { + zone = hcloud_zone.avlabs.name + name = "@" + type = "TXT" + + records = [ + { value = provider::hcloud::txt_record("v=spf1 include:icloud.com ~all"), comment = "Apple Mail" }, + { value = provider::hcloud::txt_record("apple-domain=vQO4aEkojGqDBf5D"), comment = "Apple Mail" }, + ] + + change_protection = false +}