From a345e0349e99925653a55e3efb1b7473ff1092a8 Mon Sep 17 00:00:00 2001 From: Andy Price Date: Tue, 24 Sep 2024 10:35:02 +0100 Subject: [PATCH] SP-2339 - Correct JSON encoding in API Gateway logs #patch --- terraform/environment/modules/stage/stage.tf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/terraform/environment/modules/stage/stage.tf b/terraform/environment/modules/stage/stage.tf index 36af907b..30044e78 100644 --- a/terraform/environment/modules/stage/stage.tf +++ b/terraform/environment/modules/stage/stage.tf @@ -23,14 +23,14 @@ resource "aws_api_gateway_stage" "currentstage" { destination_arn = aws_cloudwatch_log_group.lpa_data.arn format = join("", [ "{\"requestId\":\"$context.requestId\",", - "\"ip\":\"$context.identity.sourceIp\"", - "\"caller\":\"$context.identity.caller\"", - "\"user\":\"$context.identity.user\"", - "\"requestTime\":\"$context.requestTime\"", - "\"httpMethod\":\"$context.httpMethod\"", - "\"resourcePath\":\"$context.resourcePath\"", - "\"status\":\"$context.status\"", - "\"protocol\":\"$context.protocol\"", + "\"ip\":\"$context.identity.sourceIp\",", + "\"caller\":\"$context.identity.caller\",", + "\"user\":\"$context.identity.user\",", + "\"requestTime\":\"$context.requestTime\",", + "\"httpMethod\":\"$context.httpMethod\",", + "\"resourcePath\":\"$context.resourcePath\",", + "\"status\":\"$context.status\",", + "\"protocol\":\"$context.protocol\",", "\"responseLength\":\"$context.responseLength\"}" ]) }