generated from benniemosher-dev/terraform-domain-concept
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dns-records.tf
26 lines (22 loc) · 949 Bytes
/
dns-records.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
resource "cloudflare_record" "dns-records" {
name = local.sub-domain-name
proxied = true
type = "CNAME"
value = module.load-balancer.load-balancer-dns
zone_id = data.cloudflare_zone.zone.id
depends_on = [
module.load-balancer
]
}
resource "cloudflare_record" "certificate" {
count = length(module.certificate.domain-validation-options)
name = trim(module.certificate.domain-validation-options[count.index].triggers.name, ".")
priority = try(module.certificate.domain-validation-options[count.index].triggers.priority, null)
proxied = try(module.certificate.domain-validation-options[count.index].triggers.proxied, false)
type = try(module.certificate.domain-validation-options[count.index].triggers.type, "CNAME")
value = trim(module.certificate.domain-validation-options[count.index].triggers.record, ".")
zone_id = data.cloudflare_zone.zone.id
depends_on = [
module.certificate
]
}