-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute53.tf
29 lines (24 loc) · 897 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
28
29
locals {
validation_records_list = tolist(module.example_app_runner.custom_domain_association_certificate_validation_records)
}
resource "aws_route53_record" "validation_records_app_runner" {
count = 2
name = local.validation_records_list[count.index].name
type = local.validation_records_list[count.index].type
records = [local.validation_records_list[count.index].value]
ttl = 30
zone_id = data.aws_route53_zone.existing_route53_zone.zone_id
depends_on = [
module.example_app_runner
]
}
resource "aws_route53_record" "example_app_runner" {
zone_id = data.aws_route53_zone.existing_route53_zone.zone_id
name = "${var.app_sub_domain}.${data.aws_route53_zone.existing_route53_zone.name}"
type = "CNAME"
ttl = 30
records = [module.example_app_runner.custom_domain_association_dns_target]
depends_on = [
module.example_app_runner
]
}