Skip to content

Commit

Permalink
Cleanup old DNS entries (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie authored Sep 11, 2024
1 parent 7228004 commit 04fe91a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 64 deletions.
32 changes: 0 additions & 32 deletions infrastructure/production/switch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,35 +72,3 @@ module "switch_helium" {
aws = aws.helium
}
}

resource "aws_route53_record" "switch_legacy" {
zone_id = data.terraform_remote_state.core_infrastructure.outputs.route53_zone_internal_somleng_org_old.zone_id
name = "switch"
type = "A"

alias {
name = data.terraform_remote_state.core_infrastructure.outputs.hydrogen_region.internal_load_balancer.this.dns_name
zone_id = data.terraform_remote_state.core_infrastructure.outputs.hydrogen_region.internal_load_balancer.this.zone_id
evaluate_target_health = true
}
}

resource "aws_lb_listener_rule" "switch_legacy" {
priority = 30
listener_arn = data.terraform_remote_state.core_infrastructure.outputs.hydrogen_region.internal_load_balancer.https_listener.arn

action {
type = "forward"
target_group_arn = module.switch.target_group.id
}

condition {
host_header {
values = [aws_route53_record.switch_legacy.fqdn]
}
}

lifecycle {
ignore_changes = [action]
}
}
32 changes: 0 additions & 32 deletions infrastructure/staging/switch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,35 +73,3 @@ module "switch_helium" {
aws = aws.helium
}
}

resource "aws_route53_record" "switch_legacy" {
zone_id = data.terraform_remote_state.core_infrastructure.outputs.route53_zone_internal_somleng_org_old.zone_id
name = "switch-staging"
type = "A"

alias {
name = data.terraform_remote_state.core_infrastructure.outputs.hydrogen_region.internal_load_balancer.this.dns_name
zone_id = data.terraform_remote_state.core_infrastructure.outputs.hydrogen_region.internal_load_balancer.this.zone_id
evaluate_target_health = true
}
}

resource "aws_lb_listener_rule" "switch_legacy" {
priority = 130
listener_arn = data.terraform_remote_state.core_infrastructure.outputs.hydrogen_region.internal_load_balancer.https_listener.arn

action {
type = "forward"
target_group_arn = module.switch.target_group.id
}

condition {
host_header {
values = [aws_route53_record.switch_legacy.fqdn]
}
}

lifecycle {
ignore_changes = [action]
}
}

0 comments on commit 04fe91a

Please sign in to comment.