|
2 | 2 | # @todo #1000 Terraform: add UptimeRobot
|
3 | 3 | # @todo #1000 Terraform: add Mailgun
|
4 | 4 |
|
5 |
| -variable "do_token" {} |
| 5 | +variable "do_token" { |
| 6 | +} |
6 | 7 |
|
7 | 8 | # Digital Ocean provider docs: https://www.terraform.io/docs/providers/do/index.html
|
8 | 9 | provider "digitalocean" {
|
@@ -32,65 +33,76 @@ resource "digitalocean_record" "no-www" {
|
32 | 33 | name = "@"
|
33 | 34 | value = digitalocean_droplet.web.ipv4_address
|
34 | 35 | }
|
| 36 | + |
35 | 37 | resource "digitalocean_record" "www" {
|
36 | 38 | domain = digitalocean_domain.site.name
|
37 | 39 | type = "A"
|
38 | 40 | name = "www"
|
39 | 41 | value = digitalocean_droplet.web.ipv4_address
|
40 | 42 | }
|
| 43 | + |
41 | 44 | resource "digitalocean_record" "ns1" {
|
42 | 45 | domain = digitalocean_domain.site.name
|
43 | 46 | type = "NS"
|
44 | 47 | name = "@" # <-- to match the current settings. It's better to use "ns1" instead
|
45 | 48 | value = "ns1.digitalocean.com."
|
46 | 49 | }
|
| 50 | + |
47 | 51 | resource "digitalocean_record" "ns2" {
|
48 | 52 | domain = digitalocean_domain.site.name
|
49 | 53 | type = "NS"
|
50 | 54 | name = "@" # <-- to match the current settings. It's better to use "ns2" instead
|
51 | 55 | value = "ns2.digitalocean.com."
|
52 | 56 | }
|
| 57 | + |
53 | 58 | resource "digitalocean_record" "ns3" {
|
54 | 59 | domain = digitalocean_domain.site.name
|
55 | 60 | type = "NS"
|
56 | 61 | name = "@" # <-- to match the current settings. It's better to use "ns3" instead
|
57 | 62 | value = "ns3.digitalocean.com."
|
58 | 63 | }
|
| 64 | + |
59 | 65 | resource "digitalocean_record" "mx1" {
|
60 | 66 | domain = digitalocean_domain.site.name
|
61 | 67 | type = "MX"
|
62 | 68 | name = "@" # <-- to match the current settings. It's better to use "mx1" instead
|
63 | 69 | value = "mxa.mailgun.org."
|
64 | 70 | priority = 10
|
65 | 71 | }
|
| 72 | + |
66 | 73 | resource "digitalocean_record" "mx2" {
|
67 | 74 | domain = digitalocean_domain.site.name
|
68 | 75 | type = "MX"
|
69 | 76 | name = "@" # <-- to match the current settings. It's better to use "mx2" instead
|
70 | 77 | value = "mxb.mailgun.org."
|
71 | 78 | priority = 10
|
72 | 79 | }
|
| 80 | + |
73 | 81 | resource "digitalocean_record" "email" {
|
74 | 82 | domain = digitalocean_domain.site.name
|
75 | 83 | type = "CNAME"
|
76 | 84 | name = "email"
|
77 | 85 | value = "mailgun.org."
|
78 | 86 | }
|
| 87 | + |
79 | 88 | resource "digitalocean_record" "verification" {
|
80 | 89 | domain = digitalocean_domain.site.name
|
81 | 90 | type = "TXT"
|
82 | 91 | name = "@" # <-- to match the current settings. It's better to use "verification" instead
|
83 | 92 | value = "globalsign-domain-verification=405tmKGIyZt12MvKu_nJV1oCJ_e-MEjf_26bcFQX0t"
|
84 | 93 | }
|
| 94 | + |
85 | 95 | resource "digitalocean_record" "spf" {
|
86 | 96 | domain = digitalocean_domain.site.name
|
87 | 97 | type = "TXT"
|
88 | 98 | name = "@" # <-- to match the current settings. It's better to use "spf" instead
|
89 | 99 | value = "v=spf1 include:mailgun.org ~all"
|
90 | 100 | }
|
| 101 | + |
91 | 102 | resource "digitalocean_record" "domain_key" {
|
92 | 103 | domain = digitalocean_domain.site.name
|
93 | 104 | type = "TXT"
|
94 | 105 | name = "mx._domainkey"
|
95 | 106 | value = "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLo/TZgHYIM7xrU9dBJCJTTsP90rGhHuyTqSrC3LT+T3vsH5azrz1+9Dm86xz6TpcmrHV1WgmSnw72C++AXstlS8CEg6Z6XVuxMDKsMnMVEWDm1bpESy+h29Ns3kY/EzMTaF1V88ICmr6fSpQIOd9u/lZpsABjfh2wfag1rqWcGwIDAQAB"
|
96 | 107 | }
|
| 108 | + |
0 commit comments