From 97697b2986738af30d204cb1d4e85c775bc4fa66 Mon Sep 17 00:00:00 2001 From: RMcVelia Date: Mon, 8 Jul 2024 14:05:09 +0100 Subject: [PATCH] Scrape custom metrics --- terraform/aks/application.tf | 2 ++ terraform/aks/config/development_aks.tfvars.json | 3 ++- terraform/aks/config/production_aks.tfvars.json | 3 ++- terraform/aks/config/test_aks.tfvars.json | 3 ++- terraform/aks/variables.tf | 5 +++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/terraform/aks/application.tf b/terraform/aks/application.tf index aedd3fb74..9f23ea566 100644 --- a/terraform/aks/application.tf +++ b/terraform/aks/application.tf @@ -18,6 +18,8 @@ module "api_application" { web_external_hostnames = var.gov_uk_host_names web_port = 8080 enable_logit = var.enable_logit + + enable_prometheus_monitoring = var.enable_prometheus_monitoring } module "application_configuration" { diff --git a/terraform/aks/config/development_aks.tfvars.json b/terraform/aks/config/development_aks.tfvars.json index 0e01203d4..656f8903f 100644 --- a/terraform/aks/config/development_aks.tfvars.json +++ b/terraform/aks/config/development_aks.tfvars.json @@ -6,5 +6,6 @@ "cluster": "test", "namespace": "git-development", "enable_monitoring": false, - "enable_logit": true + "enable_logit": true, + "enable_prometheus_monitoring": true } diff --git a/terraform/aks/config/production_aks.tfvars.json b/terraform/aks/config/production_aks.tfvars.json index 3c6510179..03c4ce89a 100644 --- a/terraform/aks/config/production_aks.tfvars.json +++ b/terraform/aks/config/production_aks.tfvars.json @@ -13,5 +13,6 @@ "redis_sku_name": "Premium", "postgres_flexible_server_sku": "GP_Standard_D2ds_v4", "postgres_enable_high_availability": true, - "enable_logit": true + "enable_logit": true, + "enable_prometheus_monitoring": true } diff --git a/terraform/aks/config/test_aks.tfvars.json b/terraform/aks/config/test_aks.tfvars.json index df324d821..9f8d81b39 100644 --- a/terraform/aks/config/test_aks.tfvars.json +++ b/terraform/aks/config/test_aks.tfvars.json @@ -6,5 +6,6 @@ "cluster": "test", "namespace": "git-test", "enable_monitoring": false, - "enable_logit": true + "enable_logit": true, + "enable_prometheus_monitoring": true } diff --git a/terraform/aks/variables.tf b/terraform/aks/variables.tf index 3b1bffb32..4135402cf 100644 --- a/terraform/aks/variables.tf +++ b/terraform/aks/variables.tf @@ -59,6 +59,11 @@ variable "enable_logit" { default = false } +variable "enable_prometheus_monitoring" { + type = bool + default = false +} + locals { azure_credentials = try(jsondecode(var.azure_credentials), null) app_resource_group_name = "${var.azure_resource_prefix}-${var.service_short}-${var.config_short}-rg"