@@ -56,23 +56,25 @@ resource "aws_api_gateway_stage" "eligibility-signposting-api" {
5656 # A subscription filter (see csoc_log_forwarding.tf) forwards these logs to CSOC
5757 access_log_settings {
5858 destination_arn = module. eligibility_signposting_api_gateway . cloudwatch_destination_arn
59- format = jsonencode ({
60- requestId = " $context.requestId"
61- ip = " $context.identity.sourceIp"
62- caller = " $context.identity.caller"
63- user = " $context.identity.user"
64- requestTime = " $context.requestTime"
65- httpMethod = " $context.httpMethod"
66- resourcePath = " $context.resourcePath"
67- status = " $context.status"
68- protocol = " $context.protocol"
69- responseLength = " $context.responseLength"
70- accountId = " $context.accountId"
71- apiId = " $context.apiId"
72- stage = " $context.stage"
73- api_key = " $context.identity.apiKey"
74- nhse_product_id = " $context.request.header.nhse-product-id"
75- })
59+ format = << EOF
60+ {
61+ "accountId": "$context.accountId",
62+ "apiId": "$context.apiId",
63+ "api_key": "$context.identity.apiKey",
64+ "caller": "$context.identity.caller",
65+ "httpMethod": "$context.httpMethod",
66+ "ip": "$context.identity.sourceIp",
67+ "nhse_product_id": "$context.request.header.nhse-product-id",
68+ "protocol": "$context.protocol",
69+ "requestId": "$context.requestId",
70+ "requestTime": "$context.requestTime",
71+ "resourcePath": "$context.resourcePath",
72+ "responseLength": "$context.responseLength",
73+ "stage": "$context.stage",
74+ "status": "$context.status",
75+ "user": "$context.identity.user"
76+ }
77+ EOF
7678 }
7779
7880 depends_on = [
0 commit comments