Skip to content

Commit c3d4f9d

Browse files
committed
allow setting evaluate_target_health for Route53 records
1 parent 62066ff commit c3d4f9d

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

examples/complete-alb/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,13 @@ module "alb" {
447447
name = local.name
448448
type = "A"
449449
zone_id = data.aws_route53_zone.this.id
450+
evaluate_target_health = true
450451
}
451452
AAAA = {
452453
name = local.name
453454
type = "AAAA"
454455
zone_id = data.aws_route53_zone.this.id
456+
evaluate_target_health = true
455457
}
456458
}
457459

examples/mutual-auth-alb/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,13 @@ module "alb" {
150150
name = local.name
151151
type = "A"
152152
zone_id = data.aws_route53_zone.this.id
153+
evaluate_target_health = true
153154
}
154155
AAAA = {
155156
name = local.name
156157
type = "AAAA"
157158
zone_id = data.aws_route53_zone.this.id
159+
evaluate_target_health = true
158160
}
159161
}
160162
}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ resource "aws_route53_record" "this" {
795795
alias {
796796
name = aws_lb.this[0].dns_name
797797
zone_id = aws_lb.this[0].zone_id
798-
evaluate_target_health = true
798+
evaluate_target_health = coalesce(each.value.evaluate_target_health, true)
799799
}
800800
}
801801

variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ variable "route53_records" {
581581
zone_id = string
582582
name = optional(string)
583583
type = string
584+
evaluate_target_health = optional(bool)
584585
}))
585586
default = null
586587
}

0 commit comments

Comments
 (0)