Skip to content

Commit

Permalink
Remove certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
vertism committed Jan 26, 2024
1 parent 7ff7a3f commit 8aa618a
Showing 1 changed file with 59 additions and 59 deletions.
118 changes: 59 additions & 59 deletions terraform/environments/cdpt-chaps/route53.tf
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
// DEV + PRE-PRODUCTION DNS CONFIGURATION

// ACM Public Certificate
resource "aws_acm_certificate" "external" {
domain_name = "modernisation-platform.service.justice.gov.uk"
validation_method = "DNS"

subject_alternative_names = ["${var.networking[0].application}.${var.networking[0].business-unit}-${local.application_data.accounts[local.environment].environment_name}.modernisation-platform.service.justice.gov.uk"]
tags = {
Environment = local.environment
}

lifecycle {
create_before_destroy = true
}
}

resource "aws_acm_certificate_validation" "external" {
certificate_arn = aws_acm_certificate.external.arn
validation_record_fqdns = [local.domain_name_main[0], local.domain_name_sub[0]]
}

// Route53 DNS records for certificate validation
resource "aws_route53_record" "external_validation" {
provider = aws.core-network-services

allow_overwrite = true
name = local.domain_name_main[0]
records = local.domain_record_main
ttl = 60
type = local.domain_type_main[0]
zone_id = data.aws_route53_zone.network-services.zone_id
}

resource "aws_route53_record" "external_validation_subdomain" {
provider = aws.core-vpc

allow_overwrite = true
name = local.domain_name_sub[0]
records = local.domain_record_sub
ttl = 60
type = local.domain_type_sub[0]
zone_id = data.aws_route53_zone.external.zone_id
}

// Route53 DNS record for directing traffic to the service
resource "aws_route53_record" "external" {
provider = aws.core-vpc

zone_id = data.aws_route53_zone.external.zone_id
name = "${var.networking[0].application}.${var.networking[0].business-unit}-${local.application_data.accounts[local.environment].environment_name}.modernisation-platform.service.justice.gov.uk"
type = "A"

alias {
name = aws_lb.chaps_lb.dns_name
zone_id = aws_lb.chaps_lb.zone_id
evaluate_target_health = true
}
}
# // DEV + PRE-PRODUCTION DNS CONFIGURATION

# // ACM Public Certificate
# resource "aws_acm_certificate" "external" {
# domain_name = "modernisation-platform.service.justice.gov.uk"
# validation_method = "DNS"

# subject_alternative_names = ["${var.networking[0].application}.${var.networking[0].business-unit}-${local.application_data.accounts[local.environment].environment_name}.modernisation-platform.service.justice.gov.uk"]
# tags = {
# Environment = local.environment
# }

# lifecycle {
# create_before_destroy = true
# }
# }

# resource "aws_acm_certificate_validation" "external" {
# certificate_arn = aws_acm_certificate.external.arn
# validation_record_fqdns = [local.domain_name_main[0], local.domain_name_sub[0]]
# }

# // Route53 DNS records for certificate validation
# resource "aws_route53_record" "external_validation" {
# provider = aws.core-network-services

# allow_overwrite = true
# name = local.domain_name_main[0]
# records = local.domain_record_main
# ttl = 60
# type = local.domain_type_main[0]
# zone_id = data.aws_route53_zone.network-services.zone_id
# }

# resource "aws_route53_record" "external_validation_subdomain" {
# provider = aws.core-vpc

# allow_overwrite = true
# name = local.domain_name_sub[0]
# records = local.domain_record_sub
# ttl = 60
# type = local.domain_type_sub[0]
# zone_id = data.aws_route53_zone.external.zone_id
# }

# // Route53 DNS record for directing traffic to the service
# resource "aws_route53_record" "external" {
# provider = aws.core-vpc

# zone_id = data.aws_route53_zone.external.zone_id
# name = "${var.networking[0].application}.${var.networking[0].business-unit}-${local.application_data.accounts[local.environment].environment_name}.modernisation-platform.service.justice.gov.uk"
# type = "A"

# alias {
# name = aws_lb.chaps_lb.dns_name
# zone_id = aws_lb.chaps_lb.zone_id
# evaluate_target_health = true
# }
# }

0 comments on commit 8aa618a

Please sign in to comment.