diff --git a/terraform/statuscake.tf b/terraform/statuscake.tf index b9cc837ea..b6e0772e5 100644 --- a/terraform/statuscake.tf +++ b/terraform/statuscake.tf @@ -22,10 +22,10 @@ resource "statuscake_uptime_check" "alert" { } resource "statuscake_ssl_check" "domain-alert" { - count = var.statuscake_ssl_contact_group != null ? 1 : 0 + count = length(var.statuscake_ssl_contact_groups) > 0 ? 1 : 0 check_interval = 3600 # Check once per hour - contact_groups = [var.statuscake_ssl_contact_group] + contact_groups = var.statuscake_ssl_contact_groups follow_redirects = true alert_config { diff --git a/terraform/variables.tf b/terraform/variables.tf index 3185f4565..e166ab7a1 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -141,10 +141,10 @@ variable "domain" { type = string } -variable "statuscake_ssl_contact_group" { - type = string - default = null - description = "ID of the StatusCake contact group. If empty, SSL check is not enabled" +variable "statuscake_ssl_contact_groups" { + type = list(string) + default = [] + description = "IDs of the StatusCake contact group. If empty, SSL check is not enabled" } locals { diff --git a/terraform/workspace_variables/production.tfvars.json b/terraform/workspace_variables/production.tfvars.json index c4533ce28..7d835e481 100644 --- a/terraform/workspace_variables/production.tfvars.json +++ b/terraform/workspace_variables/production.tfvars.json @@ -23,5 +23,5 @@ } }, "domain": "teaching-identity.education.gov.uk", - "statuscake_ssl_contact_group": 249142 + "statuscake_ssl_contact_groups": [288912, 282453] }