Commit 7bfc001c authored by Kamil Aliev's avatar Kamil Aliev Committed by GitHub

fix: Enabled destination_options only for VPC Flow Logs on S3 (#703)

parent a93c2330
...@@ -24,10 +24,14 @@ resource "aws_flow_log" "this" { ...@@ -24,10 +24,14 @@ resource "aws_flow_log" "this" {
vpc_id = local.vpc_id vpc_id = local.vpc_id
max_aggregation_interval = var.flow_log_max_aggregation_interval max_aggregation_interval = var.flow_log_max_aggregation_interval
destination_options { dynamic "destination_options" {
file_format = var.flow_log_file_format for_each = var.flow_log_destination_type == "s3" ? [true] : []
hive_compatible_partitions = var.flow_log_hive_compatible_partitions
per_hour_partition = var.flow_log_per_hour_partition content {
file_format = var.flow_log_file_format
hive_compatible_partitions = var.flow_log_hive_compatible_partitions
per_hour_partition = var.flow_log_per_hour_partition
}
} }
tags = merge(var.tags, var.vpc_flow_log_tags) tags = merge(var.tags, var.vpc_flow_log_tags)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment