diff --git a/items/src/main/scala/weco/api/items/ItemsApi.scala b/items/src/main/scala/weco/api/items/ItemsApi.scala index d14df2f26..00ed3e59c 100644 --- a/items/src/main/scala/weco/api/items/ItemsApi.scala +++ b/items/src/main/scala/weco/api/items/ItemsApi.scala @@ -36,6 +36,13 @@ class ItemsApi( case id => notFound(s"Work not found for identifier $id") } + }, + pathPrefix("management") { + concat(path("healthcheck") { + get { + complete("message" -> "ok") + } + }) } ) } diff --git a/terraform/modules/stack/services.tf b/terraform/modules/stack/services.tf index 384f1f378..66c104e56 100644 --- a/terraform/modules/stack/services.tf +++ b/terraform/modules/stack/services.tf @@ -93,6 +93,9 @@ module "items_api" { vpc_id = var.vpc_id load_balancer_arn = aws_lb.catalogue_api.arn + # Use the HTTP healthcheck with a default path of /management/healthcheck + tcp_healthcheck = false + use_fargate_spot = var.environment_name == "stage" ? true : false turn_off_outside_office_hours = var.environment_name == "stage" ? true : false }