forked from wderezin/terraform-aws-route53-fastmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
118 lines (97 loc) · 2.59 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
data aws_route53_zone zone {
zone_id = local.zone_id
}
resource aws_route53_record mx-0 {
zone_id = data.aws_route53_zone.zone.zone_id
name = data.aws_route53_zone.zone.name
type = "MX"
ttl = local.ttl
records = [
"10 in1-smtp.messagingengine.com.",
"20 in2-smtp.messagingengine.com"
]
}
resource aws_route53_record mx-1 {
zone_id = data.aws_route53_zone.zone.zone_id
name = "*.${data.aws_route53_zone.zone.name}"
type = "MX"
ttl = local.ttl
records = [
"10 in1-smtp.messagingengine.com.",
"20 in2-smtp.messagingengine.com"
]
}
resource aws_route53_record spf {
zone_id = data.aws_route53_zone.zone.zone_id
name = data.aws_route53_zone.zone.name
type = "SPF"
ttl = local.ttl
records = [
"v=spf1 include:spf.messagingengine.com ${local.extra_spf} ?all"
]
}
resource aws_route53_record txt {
zone_id = data.aws_route53_zone.zone.zone_id
name = data.aws_route53_zone.zone.name
type = "TXT"
ttl = local.ttl
records = [
"v=spf1 include:spf.messagingengine.com ${local.extra_spf} ?all"
]
}
resource aws_route53_record domainkey {
count = 3
zone_id = data.aws_route53_zone.zone.zone_id
name = "fm${count.index}._domainkey.${data.aws_route53_zone.zone.name}"
type = "CNAME"
ttl = local.ttl
records = [
"fm${count.index}.${data.aws_route53_zone.zone.name}fmhosted.com."
]
}
resource aws_route53_record caldav {
zone_id = data.aws_route53_zone.zone.zone_id
name = "_caldavs_.tcp.${data.aws_route53_zone.zone.name}"
type = "SRV"
ttl = local.ttl
records = [
"0 1 443 caldav.fastmail.com."
]
}
resource aws_route53_record carddav {
zone_id = data.aws_route53_zone.zone.zone_id
name = "_carddav._tcp.${data.aws_route53_zone.zone.name}"
type = "SRV"
ttl = local.ttl
records = [
"0 1 443 carddav.fastmail.com."
]
}
resource aws_route53_record imaps {
zone_id = data.aws_route53_zone.zone.zone_id
name = "_imaps._tcp.${data.aws_route53_zone.zone.name}"
type = "SRV"
ttl = local.ttl
records = [
"0 1 993 imap.fastmail.com."
]
}
resource aws_route53_record submission {
zone_id = data.aws_route53_zone.zone.zone_id
name = "_submission._tcp.${data.aws_route53_zone.zone.name}"
type = "SRV"
ttl = local.ttl
records = [
"0 1 587 smtp.fastmail.com."
]
}
resource aws_route53_record mail {
zone_id = data.aws_route53_zone.zone.zone_id
name = "${local.web_hostname}.${data.aws_route53_zone.zone.name}"
type = "A"
ttl = local.ttl
records = [
"66.111.4.147",
"66.111.4.148"
]
}