Enable VPC flow logs (missed in initial review)

This commit is contained in:
Katrin Hoffmann 2026-03-12 11:00:00 +00:00
parent 850a4b5b7e
commit 32a8271fcd

View file

@ -16,3 +16,11 @@ resource "aws_vpc" "main" {
enable_dns_support = true
tags = { Name = "nexus-${var.environment}", Environment = var.environment }
}
# Flow logs added after security review flagged their absence
resource "aws_flow_log" "main" {
vpc_id = aws_vpc.main.id
traffic_type = "ALL"
iam_role_arn = aws_iam_role.flow_log.arn
log_destination = aws_cloudwatch_log_group.flow_log.arn
}