FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (3)
# Changelog
## [5.0.0](https://gitlab.developers.cam.ac.uk/uis/devops/infra/terraform/gcp-site-monitoring/compare/4.0.4...5.0.0) (2024-08-21)
### ⚠ BREAKING CHANGES
* deprecated variable alert_email_addresses removed
### Features
* deprecated variable alert_email_addresses removed ([797e417](https://gitlab.developers.cam.ac.uk/uis/devops/infra/terraform/gcp-site-monitoring/commit/797e417a51b24ed57f9a96303b461f07df2d1836))
## [4.0.4](https://gitlab.developers.cam.ac.uk/uis/devops/infra/terraform/gcp-site-monitoring/compare/4.0.3...4.0.4) (2024-08-20)
## [4.0.3](https://gitlab.developers.cam.ac.uk/uis/devops/infra/terraform/gcp-site-monitoring/compare/4.0.2...4.0.3) (2024-08-20)
......
......@@ -52,9 +52,6 @@ module "monitoring" {
# Optional. List of existing Notification Channels to be alerted.
alert_notification_channels = ["projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]"]
# Optional. List of email addresses to be alerted.
alert_email_addresses = ["ops@example.com", "sla@example.com"]
# Optional. Parameters to customise uptime checks.
uptime_check = {
# Enable alerting. Default: true.
......
......@@ -57,9 +57,7 @@ locals {
# Use the local.project value if var.monitoring_scoping_project is not provided.
monitoring_scoping_project = coalesce(var.monitoring_scoping_project, local.project)
notification_channels = concat([
for channel in google_monitoring_notification_channel.email : channel.id
], var.alert_notification_channels)
notification_channels = var.alert_notification_channels
short_service_name = replace(substr(local.authentication_proxy.cloud_run_service_name, 0, 8), "/[-_\\s]+$/", "")
}
......@@ -45,16 +45,6 @@ resource "google_monitoring_uptime_check_config" "https" {
}
}
resource "google_monitoring_notification_channel" "email" {
for_each = toset(var.alert_email_addresses)
display_name = each.value
type = "email"
labels = {
email_address = each.value
}
}
resource "google_monitoring_alert_policy" "uptime_alert" {
project = local.monitoring_scoping_project
enabled = local.uptime_check.alert_enabled
......
......@@ -27,17 +27,6 @@ EOL
default = null
}
variable "alert_email_addresses" {
type = list(string)
default = []
description = <<EOL
DEPRECATED. An optional list of email addresses which should recieve alerts.
This creates a separate Notification Channel for every email address in the list which is often not desired.
Consider creating a Notification Channel separately and passing its ID to the alert_notification_channels
variable instead.
EOL
}
variable "alert_notification_channels" {
type = list(string)
default = []
......