From b3c9619f8cee8c5ae99fa99806165c26e5a3bfa3 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 14 Jun 2023 12:33:46 +0300 Subject: [PATCH] feat(corp/ops): configure DNS records for email handling Change-Id: I19e41e559d475af78744c4623691578e8ead4327 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8769 Reviewed-by: tazjin Tested-by: BuildkiteCI --- corp/ops/yandex/rih.tf | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/corp/ops/yandex/rih.tf b/corp/ops/yandex/rih.tf index 3fd59895f..104a61f86 100644 --- a/corp/ops/yandex/rih.tf +++ b/corp/ops/yandex/rih.tf @@ -57,7 +57,35 @@ resource "yandex_dns_recordset" "acme_russiaishiring_com" { name = yandex_cm_certificate.russiaishiring_com.challenges[0].dns_name type = yandex_cm_certificate.russiaishiring_com.challenges[0].dns_type data = [yandex_cm_certificate.russiaishiring_com.challenges[0].dns_value] - ttl = 60 + ttl = 3600 +} + +resource "yandex_dns_recordset" "yandex_txt_russiaishiring_com" { + zone_id = yandex_dns_zone.russiaishiring_com.id + name = "@" + type = "TXT" + ttl = 21600 + + data = [ + "\"yandex-verification: b42768b04ab10b58\"", + "\"v=spf1 redirect=_spf.yandex.net\"" + ] +} + +resource "yandex_dns_recordset" "yandex_mx_russiaishiring_com" { + zone_id = yandex_dns_zone.russiaishiring_com.id + name = "@" + type = "MX" + data = ["10 mx.yandex.net."] + ttl = 21600 +} + +resource "yandex_dns_recordset" "yandex_dkim_russiaishiring_com" { + zone_id = yandex_dns_zone.russiaishiring_com.id + name = "mail._domainkey" + type = "TXT" + data = ["\"v=DKIM1; k=rsa; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgRfKnq+PZS3RFcHUnsKAvnBs2HCH5zSFjiZZ8/oyaC4va6I506/88HkZbME2xxfivpFmkKc6eBBpSzg6TVws0R3hAmb02u3qUQpX29+lEossq9j2fYvYBBZDf557ioxfQrE0+bIpsqV7+LXIsybq61+egbH+MKbxhda6fr4oPqwIDAQAB\""] + ttl = 21600 } resource "yandex_dns_recordset" "aname_russiaishiring_com" { @@ -65,7 +93,7 @@ resource "yandex_dns_recordset" "aname_russiaishiring_com" { name = "russiaishiring.com." type = "ANAME" data = ["russiaishiring.com.website.yandexcloud.net"] - ttl = 600 + ttl = 3600 } resource "yandex_container_registry" "rih_registry" {