diff --git a/terraform/environments/tribunals/dns-delegate-route53.tf b/terraform/environments/tribunals/dns-delegate-route53.tf index 1978636cd5e..af368364286 100644 --- a/terraform/environments/tribunals/dns-delegate-route53.tf +++ b/terraform/environments/tribunals/dns-delegate-route53.tf @@ -15,9 +15,6 @@ locals { "tax.decisions" ] - afd_records = [ - ] - afd_records_migrated = [ "administrativeappeals.decisions", "cicap.decisions", @@ -65,27 +62,16 @@ resource "aws_route53_record" "ec2_instances" { } resource "aws_route53_record" "sftp_external_services_prod" { - for_each = local.is-production ? var.sftp_services : {} + count = local.is-production ? length(local.ec2_records) : 0 allow_overwrite = true provider = aws.core-network-services zone_id = local.production_zone_id - name = "sftp.${each.value.name_prefix}.decisions.tribunals.gov.uk" + name = "sftp.${local.ec2_records[count.index]}" type = "CNAME" records = [aws_lb.tribunals_lb_sftp.dns_name] ttl = 60 } -# 'CNAME' records for all www legacy services which currently route through Azure Front Door -resource "aws_route53_record" "afd_instances" { - count = local.is-production ? length(local.afd_records) : 0 - provider = aws.core-network-services - zone_id = local.production_zone_id - name = local.afd_records[count.index] - type = "CNAME" - ttl = 300 - records = ["sdshmcts-prod-egd0dscwgwh0bpdq.z01.azurefd.net"] -} - # 'CNAME' records for all www legacy services which have been migrated to the Modernisation Platform resource "aws_route53_record" "afd_instances_migrated" { count = local.is-production ? length(local.afd_records_migrated) : 0