Skip to content

Commit

Permalink
fix resource creation when eks_audit_logs_pipeline is disabled (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanT authored Aug 9, 2024
1 parent eac59c8 commit b968480
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eks_audit_logs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ resource "aws_s3_bucket" "audit_logs" {
}

resource "aws_s3_bucket_public_access_block" "audit_logs" {
count = var.enable_eks_audit_logs_pipeline ? 1 : 0
bucket = aws_s3_bucket.audit_logs[0].id

block_public_acls = true
Expand All @@ -46,6 +47,7 @@ resource "aws_s3_bucket_public_access_block" "audit_logs" {
}

resource "aws_s3_bucket_server_side_encryption_configuration" "audit_logs" {
count = var.enable_eks_audit_logs_pipeline ? 1 : 0
bucket = aws_s3_bucket.audit_logs[0].id
rule {
apply_server_side_encryption_by_default {
Expand Down

0 comments on commit b968480

Please sign in to comment.