generated from nhs-england-tools/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 14
/
route53.tf
27 lines (22 loc) · 895 Bytes
/
route53.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
resource "aws_route53_record" "dns_record_a" {
for_each = var.create_route53_records ? toset(var.cloudfront.aliases) : toset([])
zone_id = var.hosted_zone_id
name = each.value
type = "A"
alias {
name = module.cloudfront.cloudfront_distribution.domain_name
zone_id = module.cloudfront.cloudfront_distribution.hosted_zone_id
evaluate_target_health = var.evaluate_target_health
}
}
resource "aws_route53_record" "dns_record_aaaa" {
for_each = var.create_route53_records ? toset(var.cloudfront.aliases) : toset([])
zone_id = var.hosted_zone_id
name = each.value
type = "AAAA"
alias {
name = module.cloudfront.cloudfront_distribution.domain_name
zone_id = module.cloudfront.cloudfront_distribution.hosted_zone_id
evaluate_target_health = var.evaluate_target_health
}
}