-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdashboard.tf
More file actions
35 lines (31 loc) · 870 Bytes
/
dashboard.tf
File metadata and controls
35 lines (31 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# https://github.com/strvcom/terraform-aws-fargate/blob/master/metrics/basic-dashboard.json
locals {
dashboard = {
start = "-PT4H"
end = null
periodOverride = null
widgets = [
{
x = 6
y = 0
type = "metric"
properties = {
metrics = [
["AWS/ApplicationELB", "RequestCountPerTarget", "TargetGroup", "target_group_name"]
]
view = "timeSeries"
stacked = false
region = var.aws_region
title = "RequestsPerTarget (1 min sum)"
period = 60
stat = "Sum"
liveData = false
}
}
]
}
}
resource "aws_cloudwatch_dashboard" "dashboard" {
dashboard_body = jsonencode(local.dashboard)
dashboard_name = "${var.environment}-${var.prefix}${var.app_name}${var.suffix}"
}