Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions vpc-flow-logs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ resource "aws_flow_log" "this" {
vpc_id = local.vpc_id
max_aggregation_interval = var.flow_log_max_aggregation_interval

destination_options {
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
dynamic "destination_options" {
for_each = var.flow_log_destination_type == "s3" ? [true] : []

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)
Expand Down