aboutsummaryrefslogtreecommitdiff
path: root/terraform/dns/trygvis.tf
diff options
context:
space:
mode:
Diffstat (limited to 'terraform/dns/trygvis.tf')
-rw-r--r--terraform/dns/trygvis.tf71
1 files changed, 63 insertions, 8 deletions
diff --git a/terraform/dns/trygvis.tf b/terraform/dns/trygvis.tf
index ebc9da4..4dcec85 100644
--- a/terraform/dns/trygvis.tf
+++ b/terraform/dns/trygvis.tf
@@ -17,6 +17,22 @@ resource "linode_domain_record" "root-a" {
target = "176.58.112.84"
}
+resource "linode_domain_record" "root-mx" {
+ domain_id = linode_domain.root.id
+ name = ""
+ record_type = "MX"
+ target = "in1-smtp.messagingengine.com"
+ priority = 10
+}
+
+resource "linode_domain_record" "root-mx2" {
+ domain_id = linode_domain.root.id
+ name = ""
+ record_type = "MX"
+ target = "in2-smtp.messagingengine.com"
+ priority = 20
+}
+
resource "linode_domain_record" "root-txt-google" {
domain_id = linode_domain.root.id
name = ""
@@ -39,6 +55,52 @@ resource "linode_domain_record" "root-txt-keybase" {
target = "keybase-site-verification=gcoO7zav4G2IK5KQdrWOgz_PD9wpZhz-0afIb1Kodrk"
}
+resource "linode_domain_record" "root-txt-fastmail-dkim" {
+ count = 3
+ domain_id = linode_domain.root.id
+ name = format("fm%d._domainkey", count.index + 1)
+ record_type = "CNAME"
+ target = format("fm%d.trygvis.io.dkim.fmhosted.com", count.index + 1)
+}
+
+resource "linode_domain_record" "root-txt-fastmail-spf" {
+ domain_id = linode_domain.root.id
+ name = ""
+ record_type = "TXT"
+ target = "v=spf1 include:spf.messagingengine.com ?all"
+}
+
+resource "linode_domain_record" "root-txt-fastmail-dmark" {
+ domain_id = linode_domain.root.id
+ name = "_dmarc"
+ record_type = "TXT"
+ target = "v=DMARC1; p=none;"
+}
+
+resource "linode_domain_record" "root-txt-fastmail-srv" {
+ domain_id = linode_domain.root.id
+ record_type = "SRV"
+ service = each.key
+ priority = each.value.priority
+ weight = each.value.weight
+ port = each.value.port
+ target = each.value.target
+
+ for_each = tomap({
+ submission = { priority = 0, weight = 0, port = 0, target = "." },
+ imap = { priority = 0, weight = 0, port = 0, target = "." },
+ submissions = { priority = 0, weight = 1, port = 465, target = "smtp.fastmail.com" },
+ imaps = { priority = 0, weight = 1, port = 993, target = "imap.fastmail.com" },
+ jmap = { priority = 0, weight = 1, port = 443, target = "api.fastmail.com" },
+ autodiscover = { priority = 0, weight = 1, port = 443, target = "autodiscover.fastmail.com" },
+ autodiscover = { priority = 0, weight = 1, port = 443, target = "autodiscover.fastmail.com" },
+ carddav = { priority = 0, weight = 0, port = 0, target = "." },
+ carddavs = { priority = 0, weight = 1, port = 443, target = "carddav.fastmail.com" },
+ caldav = { priority = 0, weight = 0, port = 0, target = "." },
+ caldavs = { priority = 0, weight = 1, port = 443, target = "caldav.fastmail.com" },
+ })
+}
+
resource "linode_domain_record" "root-cname-ses-1" {
domain_id = linode_domain.root.id
name = "k5o5gjadej2kkfncu36i3ef5gt473sxy._domainkey"
@@ -53,13 +115,6 @@ resource "linode_domain_record" "root-cname-ses-2" {
target = "imtuzw2lnfktlc7uongw433qbwjxxatg.dkim.amazonses.com"
}
-resource "linode_domain_record" "dlock" {
- domain_id = linode_domain.root.id
- name = "dlock"
- record_type = "A"
- target = "35.205.192.14"
-}
-
resource "linode_domain_record" "hash" {
domain_id = linode_domain.root.id
name = "hash"
@@ -115,7 +170,7 @@ resource "linode_domain_record" "grafana" {
domain_id = linode_domain.root.id
name = "grafana"
record_type = "CNAME"
- target = "vs.trygvis.io"
+ target = "hash.trygvis.io"
}
resource "linode_domain_record" "owncloud" {