Skip to content

Commit

Permalink
Fix terraform_map_duplicate_keys tflint check error (#3481)
Browse files Browse the repository at this point in the history
* Include Datadog recommendations for APIGW access logs

* Fix terraform_map_duplicate_keys tflint check error
  • Loading branch information
TylerHendrickson authored Sep 10, 2024
1 parent ee7e08d commit 6c38d48
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions terraform/modules/gost_api/gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,32 @@ module "api_gateway" {

default_stage_access_log_destination_arn = join("", aws_cloudwatch_log_group.default[*].arn)
default_stage_access_log_format = jsonencode({
requestId = "$context.requestId"
ip = "$context.identity.sourceIp"
requestTime = "$context.requestTime"
httpMethod = "$context.httpMethod"
routeKey = "$context.routeKey"
status = "$context.status"
protocol = "$context.protocol"
responseLength = "$context.responseLength"
path = "$context.path"
apiId = "$context.apiId"
stage = "$context.stage"
requestId = "$context.requestId"
xrayTraceId = "$context.xrayTraceId"
principalId = "$context.authorizer.principalId"
requestTime = "$context.requestTimeEpoch"
requestTimeCLF = "$context.requestTime"
httpMethod = "$context.httpMethod"
path = "$context.path"
resourcePath = "$context.resourcePath"
routeKey = "$context.routeKey"
protocol = "$context.protocol"
status = "$context.status"
responseLength = "$context.responseLength"
responseLatency = "$context.responseLatency"
ip = "$context.identity.sourceIp"
userAgent = "$context.identity.userAgent"
caller = "$context.identity.caller"
user = "$context.identity.user"
integration = {
error = "$context.integration.error"
serviceStatus = "$context.integration.integrationStatus"
latency = "$context.integration.latency"
requestId = "$context.integration.requestId"
status = "$context.integration.status"
errorMessage = "$context.integrationErrorMessage"
latency = "$context.integrationLatency"
}
})

Expand Down

0 comments on commit 6c38d48

Please sign in to comment.