Skip to content

Commit

Permalink
Merge pull request #103 from DFE-Digital/1647-review-all-ssl-monitors
Browse files Browse the repository at this point in the history
[1647] Enable statuscake monitoring
  • Loading branch information
saliceti authored Mar 6, 2024
2 parents 52e0e37 + 345a2a1 commit 27c2b8f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 15 deletions.
23 changes: 23 additions & 0 deletions terraform/application/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion terraform/application/config/production.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"cluster": "production",
"namespace": "cpd-production",
"environment": "production",
"enable_postgres_backup_storage" : true
"enable_postgres_backup_storage" : true,
"external_url": "https://find-a-teaching-school-hub.education.gov.uk/healthcheck",
"enable_monitoring": true
}
20 changes: 10 additions & 10 deletions terraform/application/statuscake.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//module "statuscake" {
// count = var.enable_monitoring ? 1 : 0
//
// source = "./vendor/modules/aks//monitoring/statuscake"
//
// uptime_urls = compact([module.web_application.probe_url, var.external_url])
// ssl_urls = compact([var.external_url])
//
// contact_groups = var.statuscake_contact_groups
//}
module "statuscake" {
count = var.enable_monitoring ? 1 : 0

source = "./vendor/modules/aks/monitoring/statuscake"

uptime_urls = compact([module.web_application.probe_url, var.external_url])
ssl_urls = compact([var.external_url])

contact_groups = var.statuscake_contact_groups
}
12 changes: 8 additions & 4 deletions terraform/application/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ terraform {
source = "hashicorp/kubernetes"
version = "2.21.1"
}
// statuscake = {
// source = "StatusCakeDev/statuscake"
// version = "2.1.0"
// }
statuscake = {
source = "StatusCakeDev/statuscake"
version = "2.1.0"
}
}
backend "azurerm" {
container_name = "terraform-state"
Expand Down Expand Up @@ -40,3 +40,7 @@ provider "kubernetes" {
}
}
}

provider "statuscake" {
api_token = try(module.infrastructure_secrets.map.STATUSCAKE-API-TOKEN, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
}

0 comments on commit 27c2b8f

Please sign in to comment.