Skip to content

Commit

Permalink
Merge pull request #5349 from ministryofjustice/new-domain-ifs
Browse files Browse the repository at this point in the history
Added route to new domain
  • Loading branch information
roncitrus authored Mar 13, 2024
2 parents 88db06a + 19e1a89 commit e0e76b4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion terraform/environments/cdpt-ifs/data.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#### This file can be used to store data specific to the member account ####
data "aws_route53_zone" "application_zone" {
provider = aws.core-network-services
name = "integratedfraudsystem.justice.gov.uk"
name = "integrated-fraud-system.service.justice.gov.uk"
private_zone = false
}
34 changes: 17 additions & 17 deletions terraform/environments/cdpt-ifs/route53.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

// ACM Public Certificate
resource "aws_acm_certificate" "external" {
domain_name = local.is-production ? "integratedfraudsystem.justice.gov.uk" : "modernisation-platform.service.justice.gov.uk"
domain_name = local.is-production ? "integrated-fraud-system.service.justice.gov.uk" : "modernisation-platform.service.justice.gov.uk"
validation_method = "DNS"

subject_alternative_names = local.is-production ? ["integratedfraudsystem.justice.gov.uk"] : ["${var.networking[0].application}.${var.networking[0].business-unit}-${local.environment}.modernisation-platform.service.justice.gov.uk"]
subject_alternative_names = local.is-production ? ["integrated-fraud-system.service.justice.gov.uk"] : ["${var.networking[0].application}.${var.networking[0].business-unit}-${local.environment}.modernisation-platform.service.justice.gov.uk"]
tags = {
Environment = local.environment
}
Expand Down Expand Up @@ -66,7 +66,7 @@ resource "aws_route53_record" "external" {
resource "aws_acm_certificate" "external_prod" {
count = local.is-production ? 1 : 0

domain_name = "integratedfraudsystem.justice.gov.uk"
domain_name = "integrated-fraud-system.service.justice.gov.uk"
validation_method = "DNS"
lifecycle {
create_before_destroy = true
Expand Down Expand Up @@ -97,18 +97,18 @@ resource "aws_route53_record" "external_validation_prod" {
}

// Route53 DNS record for directing traffic to the service
// resource "aws_route53_record" "external_prod" {
// count = local.is-production ? 1 : 0
// provider = aws.core-network-services

// zone_id = data.aws_route53_zone.application_zone.zone_id
// name = "integratedfraudsystem.justice.gov.uk"
// type = "A"

// alias {
// name = aws_lb.ifs_lb.dns_name
// zone_id = aws_lb.ifs_lb.zone_id
// evaluate_target_health = true
// }
// }
resource "aws_route53_record" "external_prod" {
count = local.is-production ? 1 : 0
provider = aws.core-network-services

zone_id = data.aws_route53_zone.application_zone.zone_id
name = "integrated-fraud-system.service.justice.gov.uk"
type = "A"

alias {
name = aws_lb.ifs_lb.dns_name
zone_id = aws_lb.ifs_lb.zone_id
evaluate_target_health = true
}
}

0 comments on commit e0e76b4

Please sign in to comment.