Skip to content

Commit

Permalink
Merge pull request #15 from ministryofjustice/additional-flowlog-fields
Browse files Browse the repository at this point in the history
🔧 additional VPC flow log fields required for Cortex XSIAM
  • Loading branch information
kyphutruong authored Oct 3, 2024
2 parents e6eacfa + 2fe0563 commit a1a7b6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ resource "aws_flow_log" "vpc_log" {
log_destination = aws_s3_bucket.flow_logs[count.index].arn
traffic_type = var.traffic_type
vpc_id = var.vpc_id
log_format = var.log_format
}

resource "aws_flow_log" "subnet_log" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ variable "traffic_type" {
variable "is_enabled" {
description = "switch to enable/disable the module, defaults to false"
default = false
}

variable "log_format" {
description = "Fields to include in the flow log record"
default = "$${version} $${account-id} $${interface-id} $${srcaddr} $${dstaddr} $${srcport} $${dstport} $${protocol} $${packets} $${bytes} $${start} $${end} $${action} $${log-status} $${az-id} $${flow-direction} $${instance-id} $${pkt-srcaddr} $${pkt-dstaddr} $${region} $${sublocation-id} $${sublocation-type} $${subnet-id} $${tcp-flags} $${type} $${vpc-id}"
}

0 comments on commit a1a7b6e

Please sign in to comment.