-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroute53.tf
More file actions
24 lines (22 loc) · 708 Bytes
/
Copy pathroute53.tf
File metadata and controls
24 lines (22 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -----------------------------------------------------------------------------
# Route53
# -----------------------------------------------------------------------------
resource "aws_route53_zone" "route53_zone" {
name = var.domain
force_destroy = false
tags = {
Name = "${var.project}-${var.environment}-domain"
Project = var.project
Env = var.environment
}
}
resource "aws_route53_record" "route53_record" {
zone_id = aws_route53_zone.route53_zone.id
name = "${var.environment}-elb.${var.domain}"
type = "A"
alias {
name = aws_lb.alb.dns_name
zone_id = aws_lb.alb.zone_id
evaluate_target_health = true
}
}