Skip to content

Commit

Permalink
Merge pull request #3 from dasmeta/DMVP-2073-alb-record
Browse files Browse the repository at this point in the history
fix(DMVP-2073): Changed alb alias record name.
  • Loading branch information
viktoryathegreat authored Feb 17, 2023
2 parents 4d34a06 + 2ca74a9 commit e761a5d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "alb_records" {
zone_id = module.zone_and_records.zone_id
name = each.value.name
alb = each.value.alb
geolocation_routing_policy = try(each.value.geolocation_routing_policy, null)
geolocation_routing_policy = try(each.value.geolocation_routing_policy, {})
set_identifier = try(each.value.set_identifier, null)
}

Expand Down
2 changes: 1 addition & 1 deletion record-alias-alb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "aws_route53_record" "www" {
set_identifier = var.set_identifier

alias {
name = data.aws_lb.alb.dns_name
name = "dualstack.${data.aws_lb.alb.dns_name}"
zone_id = data.aws_lb.alb.zone_id
evaluate_target_health = true
}
Expand Down
16 changes: 16 additions & 0 deletions tests/alb_record/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module "dns" {
source = "../"

zone = "devops.dasmeta.com"
create_zone = false

records = [
{
target_type = "alb"
name = "test"
alb = "dasmeta-dev"
set_identifier = null
geolocation_routing_policy = {}
}
]
}

0 comments on commit e761a5d

Please sign in to comment.