Skip to content

Commit

Permalink
StatusCake monitoring
Browse files Browse the repository at this point in the history
Monitor uptime and SSL certificate validity in production
  • Loading branch information
saliceti committed Dec 5, 2024
1 parent 0adb0bb commit 9a4457d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 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.

5 changes: 4 additions & 1 deletion terraform/application/config/production.tfvars.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"cluster": "production",
"namespace": "tech-arch-production",
"environment": "production"
"environment": "production",
"external_url": "https://technical-guidance.education.gov.uk/",
"enable_monitoring": true,
"statuscake_contact_groups": [282453]
}
10 changes: 10 additions & 0 deletions terraform/application/statuscake.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module "statuscake" {
count = var.enable_monitoring ? 1 : 0

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

uptime_urls = compact([var.external_url])
ssl_urls = compact([var.external_url])

contact_groups = var.statuscake_contact_groups
}
8 changes: 7 additions & 1 deletion terraform/application/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ terraform {
source = "hashicorp/kubernetes"
version = "2.24.0"
}

statuscake = {
source = "StatusCakeDev/statuscake"
version = "2.2.2"
}
}
backend "azurerm" {
container_name = "terraform-state"
Expand Down Expand Up @@ -37,5 +40,8 @@ provider "kubernetes" {
args = module.cluster_data.kubelogin_args
}
}
}

provider "statuscake" {
api_token = module.infrastructure_secrets.map.STATUSCAKE-API-TOKEN
}

0 comments on commit 9a4457d

Please sign in to comment.