Skip to content

Commit

Permalink
add dimension config to slow metric alrm (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennsimon authored Dec 3, 2024
1 parent e8f91f2 commit c81bbf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,8 @@ resource "aws_cloudwatch_metric_alarm" "slow_query_metric_alarm" {
notification_type = var.postgresql_slow_query_notification_type
severity = var.postgresql_slow_query_severity
}

dimensions = {
DBInstanceIdentifier = (length(var.postgresql_source_snapshot_identifier) == 0 && var.postgresql_replicate_source_db == null) ? aws_db_instance.blank-database[0].identifier : var.postgresql_replicate_source_db != null ? aws_db_instance.replica-database[0].identifier : aws_db_instance.from-snapshot[0].identifier
}
}

0 comments on commit c81bbf9

Please sign in to comment.