Files
2026-11-14 18:13:08 +09:00

29 lines
1019 B
Terraform

resource "aws_flow_log" "s3" {
region = var.region
vpc_id = local.vpc.id
traffic_type = var.flow_logs.s3.traffic_type
log_destination_type = "s3"
log_destination = var.flow_logs.s3.destination_arn
max_aggregation_interval = var.flow_logs.s3.max_aggregation_interval
tags = var.flow_logs.s3.tags
destination_options {
file_format = "parquet"
hive_compatible_partitions = false
per_hour_partition = true
}
}
resource "aws_flow_log" "cloudwatch" {
region = var.region
vpc_id = local.vpc.id
traffic_type = var.flow_logs.cloudwatch.traffic_type
log_destination_type = "cloud-watch-logs"
log_destination = var.flow_logs.cloudwatch.log_group_arn
iam_role_arn = var.flow_logs.cloudwatch.iam_role_arn
max_aggregation_interval = var.flow_logs.cloudwatch.max_aggregation_interval
tags = var.flow_logs.cloudwatch.tags
}