From a481a42741746a8249b6b22cde8a0a33c8d36edc Mon Sep 17 00:00:00 2001 From: NolanT <530295+NolanT@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:08:27 -0500 Subject: [PATCH] fix resource creation when eks_audit_logs_pipeline is disabled --- eks_audit_logs.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eks_audit_logs.tf b/eks_audit_logs.tf index 60088d1..24d7083 100644 --- a/eks_audit_logs.tf +++ b/eks_audit_logs.tf @@ -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 @@ -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 {