Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CME-253: Database monitoring and alerting on RD repositories #1123

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def vaultOverrides = [
]

// Configure branches to sync with master branch
def branchesToSync = ['demo', 'perftest']
def branchesToSync = ['demo', 'ithc', 'perftest']

// Var for testcontainers.org
env.TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX = "hmctspublic.azurecr.io/imported/"
Expand Down
8 changes: 6 additions & 2 deletions infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ locals {
s2s_rg_prefix = "rpe-service-auth-provider"
s2s_key_vault_name = var.env == "preview" || var.env == "spreview" ? join("-", ["s2s", "aat"]) : join("-", ["s2s", var.env])
s2s_vault_resource_group = var.env == "preview" || var.env == "spreview" ? join("-", [local.s2s_rg_prefix, "aat"]) : join("-", [local.s2s_rg_prefix, var.env])
db_name = join("-", [var.product-v16, var.component-v16])
}

resource "azurerm_resource_group" "rg" {
Expand Down Expand Up @@ -72,9 +73,12 @@ module "db-user-profile-v16" {
pgsql_version = "16"
pgsql_sku = var.pgsql_sku
product = "rd"
name = join("-", [var.product-v16, var.component-v16])
name = local.db_name

pgsql_server_configuration = var.pgsql_server_configuration
pgsql_server_configuration = var.pgsql_server_configuration
action_group_name = join("-", [var.action_group_name, local.db_name, var.env])
email_address_key = var.email_address_key
email_address_key_vault_id = data.azurerm_key_vault.rd_key_vault.id

}

Expand Down
12 changes: 12 additions & 0 deletions infrastructure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,16 @@ variable "pgsql_server_configuration" {
variable "pgsql_sku" {
description = "The PGSql flexible server instance sku"
default = "GP_Standard_D4s_v3"
}

variable "action_group_name" {
description = "The name of the Action Group to create."
type = string
default = "action_group"
}

variable "email_address_key" {
description = "Email address key in azure Key Vault."
type = string
default = "db-alert-monitoring-email-address"
}