Skip to content

Commit 2e0f337

Browse files
rapolaskaseliscgikiran-yenigala-hmctsAntonyLeons
authored
CME-124 enable db monitoring and alerting (#830)
Co-authored-by: Kiran Kumar Yenigala <51748133+kiran-yenigala-hmcts@users.noreply.github.com> Co-authored-by: Antony Leons <antony@leons.dev>
1 parent e95e842 commit 2e0f337

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

infrastructure/main.tf

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ locals {
6262
lastUpdated = "${timestamp()}"
6363
}
6464
common_tags = merge(var.common_tags, local.computed_tags)
65+
db_name = "${var.product}-${var.component}-postgres-db-flex"
6566
}
6667

6768
//Azure Flexible Server DB
@@ -70,13 +71,17 @@ module "wa_case_event_handler_database_flex" {
7071
azurerm.postgres_network = azurerm.postgres_network
7172
}
7273

73-
source = "git@github.com:hmcts/terraform-module-postgresql-flexible?ref=master"
74-
product = var.product
75-
component = var.component
76-
name = "${var.product}-${var.component}-postgres-db-flex"
77-
location = var.location
78-
business_area = "cft"
79-
env = var.env
74+
source = "git@github.com:hmcts/terraform-module-postgresql-flexible?ref=master"
75+
product = var.product
76+
component = var.component
77+
name = local.db_name
78+
location = var.location
79+
business_area = "cft"
80+
env = var.env
81+
action_group_name = join("-", [local.db_name, var.action_group_name])
82+
email_address_key = var.email_address_key
83+
email_address_key_vault_id = data.azurerm_key_vault.wa_key_vault.id
84+
8085
pgsql_databases = [
8186
{
8287
name : var.postgresql_database_name

infrastructure/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,15 @@ variable "jenkins_AAD_objectId" {
3939
}
4040

4141
variable "aks_subscription_id" {} # provided by the Jenkins library, ADO users will need to specify this
42+
43+
variable "action_group_name" {
44+
description = "The name of the Action Group to create."
45+
type = string
46+
default = "wa-support"
47+
}
48+
49+
variable "email_address_key" {
50+
description = "Email address key in azure Key Vault."
51+
type = string
52+
default = "db-alert-monitoring-email-address"
53+
}

0 commit comments

Comments
 (0)