-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhealthcheck_status.tf
More file actions
66 lines (59 loc) · 1.96 KB
/
healthcheck_status.tf
File metadata and controls
66 lines (59 loc) · 1.96 KB
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
resource "aws_api_gateway_method" "_status" {
#checkov:skip=CKV_AWS_59: API is secured via Apigee proxy with mTLS, API keys are not used
#checkov:skip=CKV2_AWS_53: No request parameters to validate for static healthcheck endpoint
rest_api_id = module.eligibility_signposting_api_gateway.rest_api_id
resource_id = aws_api_gateway_resource._status.id
http_method = "GET"
authorization = "NONE"
depends_on = [
aws_api_gateway_resource._status,
]
}
resource "aws_api_gateway_integration" "_status" {
rest_api_id = module.eligibility_signposting_api_gateway.rest_api_id
resource_id = aws_api_gateway_resource._status.id
http_method = aws_api_gateway_method._status.http_method
type = "MOCK"
request_templates = {
"application/json" = jsonencode({
statusCode = 200
})
}
}
resource "aws_api_gateway_method_response" "_status" {
rest_api_id = module.eligibility_signposting_api_gateway.rest_api_id
resource_id = aws_api_gateway_resource._status.id
http_method = aws_api_gateway_method._status.http_method
status_code = "200"
response_models = {
"application/json" = "Empty"
}
}
resource "aws_api_gateway_integration_response" "_status" {
rest_api_id = module.eligibility_signposting_api_gateway.rest_api_id
resource_id = aws_api_gateway_resource._status.id
http_method = aws_api_gateway_method._status.http_method
status_code = aws_api_gateway_method_response._status.status_code
response_templates = {
"application/json" = jsonencode({
status = "pass",
version = "",
revision = "",
releaseId = "",
commitId = "",
checks = {
"healthcheckService:status" = [
{
status = "pass",
timeout = false,
responseCode = 200,
outcome = "<html><h1>Ok</h1></html>",
links = {
self = "http://healthcheckService.example.com/_status"
}
}
]
}
})
}
}