Skip to content

Commit

Permalink
[1.x] Updated resource names and alarm_description.
Browse files Browse the repository at this point in the history
  • Loading branch information
wescmx authored Oct 29, 2024
1 parent 2208cce commit 8256f1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "aws_cloudwatch_log_metric_filter" "sg_metric_filter" {
resource "aws_cloudwatch_log_metric_filter" "metric_filter" {
count = length(var.sg_ids)
log_group_name = var.cw_log_group_name
name = "${var.sg_ids[count.index]}-metric-filter"
Expand All @@ -11,7 +11,7 @@ resource "aws_cloudwatch_log_metric_filter" "sg_metric_filter" {
}
}

resource "aws_cloudwatch_metric_alarm" "elb_metric_filter_alarm" {
resource "aws_cloudwatch_metric_alarm" "metric_filter_alarm" {
count = length(var.sg_ids)
alarm_name = "${var.sg_ids[count.index]}-metric-filter-alarm"
comparison_operator = var.cw_metric_filter_alarm_comparison_operator
Expand All @@ -21,6 +21,6 @@ resource "aws_cloudwatch_metric_alarm" "elb_metric_filter_alarm" {
period = var.cw_metric_filter_alarm_period
statistic = var.cw_metric_filter_alarm_statistic
threshold = var.cw_metric_filter_alarm_threshold
alarm_description = "Alarm when Security Group ${var.sg_ids[count.index]} exceeds the specified threshold."
alarm_description = "Alarm when the resource exceeds the specified threshold."
alarm_actions = var.cw_metric_filter_alarm_actions
}

0 comments on commit 8256f1c

Please sign in to comment.