Skip to content

Commit 0f19821

Browse files
Create dashboard.tf
1 parent 974b954 commit 0f19821

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
resource "aws_cloudwatch_dashboard" "main" {
2+
dashboard_name = "test-d"
3+
4+
dashboard_body = <<EOF
5+
{
6+
"widgets": [
7+
{
8+
"type": "metric",
9+
"x": 0,
10+
"y": 0,
11+
"width": 12,
12+
"height": 6,
13+
"properties": {
14+
"metrics": [
15+
[
16+
"AWS/ApiGateway",
17+
"4XXError",
18+
"name",
19+
"${var.example}"
20+
],
21+
[
22+
"AWS/ApiGateway",
23+
"5XXError",
24+
"name",
25+
"${var.example}"
26+
]
27+
],
28+
"period": 60,
29+
"stat": "Sum",
30+
"region": "enter-region",
31+
"title": "dashboard for 4XXError and 5XXXError"
32+
}
33+
},
34+
{
35+
"type": "text",
36+
"x": 0,
37+
"y": 7,
38+
"width": 3,
39+
"height": 3,
40+
"properties": {
41+
"markdown": "Hello world"
42+
}
43+
}
44+
]
45+
}
46+
EOF
47+
}

0 commit comments

Comments
 (0)