From bdfa10c7b845a0fe847c3d3e7db862f73a6c2635 Mon Sep 17 00:00:00 2001 From: matt-k1998 Date: Thu, 12 Dec 2024 16:27:33 +0000 Subject: [PATCH] Tribunals: Add Maintenance Page --- .../environments/tribunals/load_balancer.tf | 79 ++++++++++++++----- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/terraform/environments/tribunals/load_balancer.tf b/terraform/environments/tribunals/load_balancer.tf index c235bdf2383..e2b0b7f8ca6 100644 --- a/terraform/environments/tribunals/load_balancer.tf +++ b/terraform/environments/tribunals/load_balancer.tf @@ -8,27 +8,27 @@ locals { ) } service_priorities = { - adminappeals = 1 - administrativeappeals = 2 - carestandards = 3 - charity = 4 - cicap = 5 - claimsmanagement = 6 - consumercreditappeals = 7 - employmentappeals = 8 - estateagentappeals = 9 - financeandtax = 10 - immigrationservices = 11 - informationrights = 12 - landregistrationdivision = 13 - landschamber = 14 - phl = 15 - siac = 16 - sscs = 17 - tax = 18 - taxandchancery_ut = 19 - transportappeals = 20 - asylumsupport = 21 + adminappeals = 2 + administrativeappeals = 3 + carestandards = 4 + charity = 5 + cicap = 6 + claimsmanagement = 7 + consumercreditappeals = 8 + employmentappeals = 9 + estateagentappeals = 10 + financeandtax = 11 + immigrationservices = 12 + informationrights = 13 + landregistrationdivision = 14 + landschamber = 15 + phl = 16 + siac = 17 + sscs = 18 + tax = 19 + taxandchancery_ut = 20 + transportappeals = 21 + asylumsupport = 22 } } @@ -154,3 +154,40 @@ resource "aws_lb_listener_rule" "tribunals_lb_rule" { } } } + +resource "aws_lb_listener_rule" "maintenance_page" { + listener_arn = aws_lb_listener.tribunals_lb.arn + priority = 1 + +action { + type = "fixed-response" + fixed_response { + content_type = "text/html" + message_body = < + + + + + Maintenance - We'll be back soon + + +
+
🔧
+

We'll be back soon!

+

We are currently performing scheduled maintenance to improve our services. We apologize for any inconvenience.

+

Please check back shortly. Thank you for your patience.

+
+ + +EOF + status_code = "503" + } + } + + condition { + host_header { + values = ["*.*"] + } + } +}