Skip to content

[s3-logfile] allow cloudfront parser #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions modules/s3-logfile/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ module "s3_processor" {


environment_variables = {
PARSER_TYPE = var.parser_type
TIME_FIELD_NAME = "timestamp"
TIME_FIELD_FORMAT = "2006-01-02T15:04:05.9999Z"
FORCE_GUNZIP = true

PARSER_TYPE = var.parser_type
FORCE_GUNZIP = true
ENVIRONMENT = var.environment
HONEYCOMB_WRITE_KEY = var.honeycomb_api_key
KMS_KEY_ID = (var.kms_key_arn != "" ? data.aws_arn.kms_key[0].resource : "")
Expand Down
2 changes: 1 addition & 1 deletion modules/s3-logfile/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ variable "parser_type" {
description = "The type of logfile to parse."
validation {
// ref: https://github.com/honeycombio/agentless-integrations-for-aws/blob/5f530c296035c61067a6a418d6a9ab14d34d7d79/common/common.go#L129-L153
condition = contains(["alb", "elb", "s3-access", "vpc-flow", "json", "keyval"], var.parser_type)
condition = contains(["alb", "elb", "s3-access", "vpc-flow", "cloudfront", "json", "keyval"], var.parser_type)
error_message = "parser_type must be one of the allowed values"
}
}
Expand Down