generated from TechNative-B-V/terraform-aws-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
route53.tf
29 lines (24 loc) · 795 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
data "aws_route53_zone" "this" {
name = var.route53_zone_name
}
resource "aws_route53_record" "website-domain" {
name = var.domain
type = "A"
zone_id = data.aws_route53_zone.this.zone_id
alias {
name = module.cloudfront.cloudfront_distribution_domain_name
zone_id = module.cloudfront.cloudfront_distribution_hosted_zone_id
evaluate_target_health = false
}
}
resource "aws_route53_record" "cognito-domain" {
name = "${var.cognito_domain_prefix}.${var.domain}"
type = "A"
zone_id = data.aws_route53_zone.this.zone_id
alias {
evaluate_target_health = false
name = module.cognito-user-pool.domain_cloudfront_distribution_arn
# This zone_id is fixed points to AWS Cognito Services
zone_id = "Z2FDTNDATAQYW2"
}
}