Skip to content

Commit a2fd6f4

Browse files
committed
duplicate log config on hec ack lb
1 parent f9f9e66 commit a2fd6f4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

terraform/instances-template/instance-ihf.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,22 @@ resource "aws_lb" "ihfhec-ack" {
409409
security_groups = [aws_security_group.splunk-lb-hecihf-outbound.id, aws_security_group.splunk-lbhecihf.id]
410410
subnets = (local.use-elb-private == "false" ? [local.subnet_pub_1_id, local.subnet_pub_2_id, local.subnet_pub_3_id] : [local.subnet_priv_1_id, local.subnet_priv_2_id, local.subnet_priv_3_id])
411411
drop_invalid_header_fields = true
412+
# Tracks HTTP Requests
413+
access_logs {
414+
bucket = aws_s3_bucket.s3_data.bucket
415+
prefix = "log/lbhecack"
416+
enabled = true
417+
}
418+
# Tracks TCP/TLS Connections (ALB only)
419+
connection_logs {
420+
bucket = aws_s3_bucket.s3_data.bucket
421+
prefix = "log/lbhecack"
422+
enabled = true
423+
}
424+
# Critical: Ensure the policy is attached before the LB tries to verify access
425+
depends_on = [
426+
aws_s3_bucket_policy.allow_access_for_lb_logs
427+
]
412428
}
413429

414430

0 commit comments

Comments
 (0)