Skip to content

Commit 57b196d

Browse files
committed
chore: add terraform configuration for MX-type DNS records.
Part of #1000 [skip ci]
1 parent 7a68723 commit 57b196d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

infra/terraform/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
$ terraform import digitalocean_record.ns1 my-stamps.ru,<id>
2020
$ terraform import digitalocean_record.ns2 my-stamps.ru,<id>
2121
$ terraform import digitalocean_record.ns3 my-stamps.ru,<id>
22+
$ terraform import digitalocean_record.mx1 my-stamps.ru,<id>
23+
$ terraform import digitalocean_record.mx2 my-stamps.ru,<id>
2224
```
2325
The ids can be obtained by API:
2426
- https://developers.digitalocean.com/documentation/v2/#list-all-droplets

infra/terraform/my-stamps.tf

+14
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,17 @@ resource "digitalocean_record" "ns3" {
5454
name = "@" # <-- to match the current settings. It's better to use "ns3" instead
5555
value = "ns3.digitalocean.com."
5656
}
57+
resource "digitalocean_record" "mx1" {
58+
domain = digitalocean_domain.site.name
59+
type = "MX"
60+
name = "@" # <-- to match the current settings. It's better to use "mx1" instead
61+
value = "mxa.mailgun.org."
62+
priority = 10
63+
}
64+
resource "digitalocean_record" "mx2" {
65+
domain = digitalocean_domain.site.name
66+
type = "MX"
67+
name = "@" # <-- to match the current settings. It's better to use "mx2" instead
68+
value = "mxb.mailgun.org."
69+
priority = 10
70+
}

0 commit comments

Comments
 (0)