Created
September 22, 2020 05:53
-
-
Save sschrijver/6c7b4dfe8b6833d9967551a1f0279a0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_cloudwatch_metric_alarm" "sqs_scale_out" { | |
alarm_name = "SQS-ScaleOut-${var.service_name}" | |
comparison_operator = "GreaterThanOrEqualToThreshold" | |
evaluation_periods = "1" | |
metric_name = "ApproximateNumberOfMessagesVisible" | |
namespace = "AWS/SQS" | |
period = "60" | |
threshold = "1" | |
statistic = "Sum" | |
alarm_description = "SQS-ScaleOut-${var.service_name}" | |
insufficient_data_actions = [] | |
alarm_actions = [ | |
aws_appautoscaling_policy.scale_up_fargate.arn] | |
dimensions = { | |
QueueName = var.queue_name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment