diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2024-07-27 08:18:55 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2024-07-27 08:40:01 +0200 |
commit | af08ef32cf17f8791d7d121157c48534ca7a8e0b (patch) | |
tree | a5d740caed2bee5dd2076f2785e5622cef2ea88b | |
parent | 603f3abadd566b51a5f52cf04150c852dbc2dc11 (diff) | |
download | infra-af08ef32cf17f8791d7d121157c48534ca7a8e0b.tar.gz infra-af08ef32cf17f8791d7d121157c48534ca7a8e0b.tar.bz2 infra-af08ef32cf17f8791d7d121157c48534ca7a8e0b.tar.xz infra-af08ef32cf17f8791d7d121157c48534ca7a8e0b.zip |
Switching MX to fastmail
-rw-r--r-- | terraform/dns/main.tf | 2 | ||||
-rw-r--r-- | terraform/dns/trygvis.tf | 30 |
2 files changed, 24 insertions, 8 deletions
diff --git a/terraform/dns/main.tf b/terraform/dns/main.tf index c67944e..753ef75 100644 --- a/terraform/dns/main.tf +++ b/terraform/dns/main.tf @@ -14,7 +14,7 @@ terraform { required_providers { linode = { version = "2.7.1" - source = "linode/linode" + source = "linode/linode" } } } diff --git a/terraform/dns/trygvis.tf b/terraform/dns/trygvis.tf index 3b81b11..70e971f 100644 --- a/terraform/dns/trygvis.tf +++ b/terraform/dns/trygvis.tf @@ -21,10 +21,18 @@ resource "linode_domain_record" "root-mx" { domain_id = linode_domain.root.id name = "" record_type = "MX" - target = "knot.inamo.no" + 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 = "" @@ -47,12 +55,20 @@ resource "linode_domain_record" "root-txt-keybase" { target = "keybase-site-verification=gcoO7zav4G2IK5KQdrWOgz_PD9wpZhz-0afIb1Kodrk" } -# resource "linode_domain_record" "root-txt-protonmail" { -# domain_id = linode_domain.root.id -# name = "trygvis.io" -# record_type = "TXT" -# target = "protonmail-verification=040b9503f0fe071ec3dfbe5b1c588d384ebec74a" -# } +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-cname-ses-1" { domain_id = linode_domain.root.id |