-
Notifications
You must be signed in to change notification settings - Fork 0
/
route53.tf
36 lines (33 loc) · 836 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
30
31
32
33
34
35
36
data "aws_route53_zone" "target_host_zone" {
name = "${var.domain_name}."
}
module "route53_records" {
source = "terraform-aws-modules/route53/aws//modules/records"
zone_id = data.aws_route53_zone.target_host_zone.zone_id
records = [
{
name = ""
type = "A"
alias = {
name = module.cloudfront.cloudfront_distribution_domain_name
zone_id = module.cloudfront.cloudfront_distribution_hosted_zone_id
}
},
{
name = "www"
type = "A"
alias = {
name = module.cloudfront.cloudfront_distribution_domain_name
zone_id = module.cloudfront.cloudfront_distribution_hosted_zone_id
}
},
{
name = "api"
type = "A"
alias = {
name = module.alb.dns_name
zone_id = module.alb.zone_id
}
},
]
}