Skip to content

Commit

Permalink
Add heartbeat monitor for statuscake
Browse files Browse the repository at this point in the history
  • Loading branch information
johnake committed Aug 28, 2024
1 parent 4a8b6e1 commit fd8ee25
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions terraform/application/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ module "application_configuration" {
PGSSLMODE = local.postgres_ssl_mode
CANONICAL_HOSTNAME = local.canonical_hostname
})
secret_variables = {
DATABASE_URL = module.postgres.url
}
secret_variables = merge(
{
DATABASE_URL = module.postgres.url
HEARTBEAT_CHECK_URL = module.statuscake[0].heartbeat_check_urls[local.heartbeat_check_name]
}
)
}

module "web_application" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/application/config/review_Terrafile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
aks:
source: "https://github.com/DFE-Digital/terraform-modules"
version: "main"
version: "testing"
2 changes: 2 additions & 0 deletions terraform/application/statuscake.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ module "statuscake" {
ssl_urls = compact([var.external_url])

contact_groups = var.statuscake_contact_groups

heartbeat_names = [local.heartbeat_check_name]
}
1 change: 1 addition & 0 deletions terraform/application/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@ locals {
canonical_hostname = var.canonical_hostname != null ? var.canonical_hostname : "${var.service_name}-${var.environment}-web.test.teacherservices.cloud"
app_env_values_from_yml = yamldecode(file("${path.module}/config/${var.config}_app_env.yml"))
app_env_values = merge(local.app_env_values_from_yml)
heartbeat_check_name = "heartbeat-check"
}

0 comments on commit fd8ee25

Please sign in to comment.