Skip to content

Commit

Permalink
Fix alarm actions (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjjung authored Dec 2, 2024
1 parent e41b0c4 commit 5c82da5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tb_pulumi/cloudwatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(
lambda outputs: aws.cloudwatch.MetricAlarm(
f'{self.name}-5xx',
name=f'{self.project.name_prefix}-5xx',
alarm_actions=monitoring_group.resources['sns_topic'].arn,
alarm_actions=[monitoring_group.resources['sns_topic'].arn],
comparison_operator='GreaterThanOrEqualToThreshold',
dimensions={'LoadBalancer': outputs['res_suffix']},
metric_name='HTTPCode_ELB_5XX_Count',
Expand Down Expand Up @@ -163,7 +163,7 @@ def __init__(
lambda outputs: aws.cloudwatch.MetricAlarm(
f'{self.name}-responsetime',
name=f'{self.project.name_prefix}-responsetime',
alarm_actions=monitoring_group.resources['sns_topic'].arn,
alarm_actions=[monitoring_group.resources['sns_topic'].arn],
comparison_operator='GreaterThanOrEqualToThreshold',
dimensions={'LoadBalancer': outputs['res_suffix']},
metric_name='TargetResponseTime',
Expand Down Expand Up @@ -239,7 +239,7 @@ def __init__(
lambda outputs: aws.cloudwatch.MetricAlarm(
f'{self.name}-cpu',
name=f'{self.project.name_prefix}-cpu',
alarm_actions=monitoring_group.resources['sns_topic'].arn,
alarm_actions=[monitoring_group.resources['sns_topic'].arn],
comparison_operator='GreaterThanOrEqualToThreshold',
# There is no direct way to get the Cluster name from a Service, but we can get the ARN, which has the
# name as the final portion after the last slash.
Expand Down Expand Up @@ -274,7 +274,7 @@ def __init__(
lambda outputs: aws.cloudwatch.MetricAlarm(
f'{self.name}-memory',
name=f'{self.project.name_prefix}-memory',
alarm_actions=monitoring_group.resources['sns_topic'].arn,
alarm_actions=[monitoring_group.resources['sns_topic'].arn],
comparison_operator='GreaterThanOrEqualToThreshold',
# There is no direct way to get the Cluster name from a Service, but we can get the ARN, which has the
# name as the final portion after the last slash.
Expand Down

0 comments on commit 5c82da5

Please sign in to comment.