Skip to content
Snippets Groups Projects
Commit fb307ee3 authored by Malte Finsterwalder's avatar Malte Finsterwalder
Browse files

Merge branch 'main' into production

parents ec38e4c1 b2717b1e
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,14 @@ data "terraform_remote_state" "holi_infra_state" {
}
}
data "terraform_remote_state" "holi_infra_monitoring_state" {
backend = "gcs"
config = {
bucket = "holi-shared-terraform-state"
prefix = "infra-monitoring"
}
}
data "terraform_remote_state" "holi_chat_server_common_state" {
backend = "gcs"
config = {
......
resource "google_monitoring_alert_policy" "chat_server_cpu_utilization" {
count = local.environment == "production" ? 1 : 0
display_name = "COMO: Production chat server CPU utilization exceeded"
notification_channels = [data.terraform_remote_state.holi_infra_state.outputs.monitoring_notification_channel_rocket_chat_production_id]
notification_channels = [data.terraform_remote_state.holi_infra_monitoring_state.outputs.monitoring_notification_channel_rocket_chat_production_id]
severity = "WARNING"
alert_strategy {
auto_close = "86400s" # 1 day
......@@ -41,7 +41,7 @@ resource "google_monitoring_alert_policy" "chat_server_cpu_utilization" {
resource "google_monitoring_alert_policy" "chat_server_memory_utilization" {
count = local.environment == "production" ? 1 : 0
display_name = "COMO: ${local.environment} chat server memory utilization exceeded"
notification_channels = [data.terraform_remote_state.holi_infra_state.outputs.monitoring_notification_channel_rocket_chat_production_id]
notification_channels = [data.terraform_remote_state.holi_infra_monitoring_state.outputs.monitoring_notification_channel_rocket_chat_production_id]
severity = "WARNING"
alert_strategy {
auto_close = "86400s" # 1 day
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment