-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkly_check.tf
102 lines (85 loc) · 2.28 KB
/
checkly_check.tf
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
resource "checkly_check" "browser_check" {
name = "Webserver check"
type = "API"
activated = true
should_fail = false
frequency = 10
double_check = true
use_global_alert_settings = true
locations = [
"eu-west-1",
"eu-west-2"
]
tags = ["aws", "terraform"]
request {
url = "http://${aws_instance.webserver.public_dns}"
follow_redirects = true
body_type = "JSON"
method = "GET"
assertion {
source = "STATUS_CODE"
comparison = "EQUALS"
target = "200"
}
}
}
resource "checkly_check" "elasticache_check" {
name = "Elasticache check"
type = "API"
activated = true
should_fail = false
frequency = 10
double_check = true
use_global_alert_settings = true
private_locations = [
"new-location"
]
tags = ["aws", "terraform", "private"]
request {
url = "http://${aws_instance.checkly.private_ip}:8080/healthz"
follow_redirects = true
body_type = "JSON"
method = "GET"
assertion {
source = "STATUS_CODE"
comparison = "EQUALS"
target = "200"
}
assertion {
source = "JSON_BODY"
property = "$.results[1].found"
comparison = "EQUALS"
target = "PONG"
}
}
}
resource "checkly_check" "rds_check" {
name = "RDS check"
type = "API"
activated = true
should_fail = false
frequency = 10
double_check = true
use_global_alert_settings = true
private_locations = [
"new-location"
]
tags = ["aws", "terraform", "private"]
request {
url = "http://${aws_instance.checkly.private_ip}:8080/healthz"
follow_redirects = true
body_type = "JSON"
method = "GET"
assertion {
source = "STATUS_CODE"
comparison = "EQUALS"
target = "200"
}
assertion {
source = "JSON_BODY"
property = "$.results[3].found"
comparison = "EQUALS"
target = "1"
}
}
}