Skip to content

Commit

Permalink
Tribunals: Add Maintenance Page
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-k1998 committed Dec 12, 2024
1 parent 5710148 commit bdfa10c
Showing 1 changed file with 58 additions and 21 deletions.
79 changes: 58 additions & 21 deletions terraform/environments/tribunals/load_balancer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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 = <<EOF
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Maintenance - We'll be back soon</title>
</head>
<body style="font-family:Arial,sans-serif;text-align:center;padding:40px;max-width:600px;margin:0 auto">
<div style="background:#fff;padding:20px;border-radius:10px">
<div style="font-size:48px">🔧</div>
<h1>We'll be back soon!</h1>
<p>We are currently performing scheduled maintenance to improve our services. We apologize for any inconvenience.</p>
<p>Please check back shortly. Thank you for your patience.</p>
</div>
</body>
</html>
EOF
status_code = "503"
}
}

condition {
host_header {
values = ["*.*"]
}
}
}

0 comments on commit bdfa10c

Please sign in to comment.