File tree Expand file tree Collapse file tree 1 file changed +15
-30
lines changed
Expand file tree Collapse file tree 1 file changed +15
-30
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,9 @@ resource "aws_cloudwatch_metric_alarm" "app_dlq_messages_alarm" {
1111 evaluation_periods = 1
1212 comparison_operator = " GreaterThanThreshold"
1313 threshold = 0
14- dimensions = [
15- {
16- Name = " QueueName"
17- Value = " ${ var . resource_prefix } -sqs-dlq"
18- }
19- ]
14+ dimensions = {
15+ QueueName = " ${ var . resource_prefix } -sqs-dlq"
16+ }
2017 alarm_actions = [
2118 var . priority_sns_arn
2219 ]
@@ -35,12 +32,9 @@ resource "aws_cloudwatch_metric_alarm" "app_latency_alarm" {
3532 alarm_actions = [
3633 var . standard_sns_arn
3734 ]
38- dimensions = [
39- {
40- Name = " FunctionName"
41- Value = " ${ var . resource_prefix } -lambda"
42- }
43- ]
35+ dimensions = {
36+ FunctionName = " ${ var . resource_prefix } -lambda"
37+ }
4438}
4539
4640resource "aws_cloudwatch_metric_alarm" "app_no_requests_alarm" {
@@ -56,12 +50,9 @@ resource "aws_cloudwatch_metric_alarm" "app_no_requests_alarm" {
5650 alarm_actions = [
5751 var . priority_sns_arn
5852 ]
59- dimensions = [
60- {
61- Name = " FunctionName"
62- Value = " ${ var . resource_prefix } -lambda"
63- }
64- ]
53+ dimensions = {
54+ FunctionName = " ${ var . resource_prefix } -lambda"
55+ }
6556}
6657
6758resource "aws_cloudwatch_metric_alarm" "app_invocation_error_alarm" {
@@ -77,12 +68,9 @@ resource "aws_cloudwatch_metric_alarm" "app_invocation_error_alarm" {
7768 alarm_actions = [
7869 var . priority_sns_arn
7970 ]
80- dimensions = [
81- {
82- Name = " FunctionName"
83- Value = " ${ var . resource_prefix } -lambda"
84- }
85- ]
71+ dimensions = {
72+ FunctionName = " ${ var . resource_prefix } -lambda"
73+ }
8674}
8775
8876resource "aws_cloudwatch_metric_alarm" "app5xx_error_alarm" {
@@ -98,10 +86,7 @@ resource "aws_cloudwatch_metric_alarm" "app5xx_error_alarm" {
9886 alarm_actions = [
9987 var . priority_sns_arn
10088 ]
101- dimensions = [
102- {
103- Name = " DistributionId"
104- Value = var.main_cloudfront_distribution_id
105- }
106- ]
89+ dimensions = {
90+ DistributionId = var.main_cloudfront_distribution_id
91+ }
10792}
You can’t perform that action at this time.
0 commit comments