Skip to content

Commit 9b20dbb

Browse files
authored
fix: Updated s3 block http policy condition (#58)
1 parent 0c7b858 commit 9b20dbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "example" {
258258
}
259259

260260
resource "aws_s3_bucket_policy" "block-http" {
261-
count = var.block_http_traffic ? 1 : 0
261+
count = var.enable && var.enable_flow_log && var.flow_log_destination_arn == null && var.flow_log_destination_type == "s3" && var.block_http_traffic ? 1 : 0
262262
bucket = aws_s3_bucket.mybucket[0].id
263263

264264
policy = jsonencode({

0 commit comments

Comments
 (0)