-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path18-route53.tf
34 lines (28 loc) · 1003 Bytes
/
18-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
# Retrieves Route 53 hosted zone details using the provided zone name
data "aws_route53_zone" "route53_zone_1" {
name = var.route53_zone_1_name
}
# Creates an A record in the Route 53 hosted zone
resource "aws_route53_record" "gitlab_heyvalemar_net" {
zone_id = data.aws_route53_zone.route53_zone_1.zone_id
name = "gitlab.${data.aws_route53_zone.route53_zone_1.name}"
type = "A"
alias {
name = aws_lb.alb_1.dns_name
zone_id = aws_lb.alb_1.zone_id
evaluate_target_health = false
}
depends_on = [aws_lb.alb_1]
}
# Creates an A record in the Route 53 hosted zone
resource "aws_route53_record" "ssh_heyvaldemar_net" {
zone_id = data.aws_route53_zone.route53_zone_1.zone_id
name = "ssh.${data.aws_route53_zone.route53_zone_1.name}"
type = "A"
alias {
name = aws_lb.nlb_1.dns_name
zone_id = aws_lb.nlb_1.zone_id
evaluate_target_health = false
}
depends_on = [aws_lb.nlb_1]
}