Skip to content

Commit

Permalink
Added route to new domain
Browse files Browse the repository at this point in the history
  • Loading branch information
fshafaatmoj committed Mar 13, 2024
1 parent 88db06a commit 19e1a89
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 19e1a89

Please sign in to comment.