File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/integrations/cloud-logs Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ locals {
6969 is_cross_account = var. bucket_account_id != null && var. bucket_account_id != data. aws_caller_identity . current . account_id
7070
7171 # KMS variables
72- kms_account_id = split (" :" , var. kms_key_arn )[3 ]
73- need_kms_policy = var. bucket_account_id != null && var. bucket_account_id != local. kms_account_id
72+ kms_account_id = var . kms_key_arn != null && var . kms_key_arn != " " ? split (" :" , var. kms_key_arn )[3 ] : null
73+ need_kms_policy = var. bucket_account_id != null && local . kms_account_id != null && var. bucket_account_id != local. kms_account_id
7474
7575 # Role variables
7676 role_name = split (" /" , var. role_arn )[1 ]
@@ -152,7 +152,7 @@ data "aws_iam_policy_document" "cloudlogs_s3_access" {
152152 }
153153
154154 dynamic "statement" {
155- for_each = var. kms_key_arn != null ? [1 ] : []
155+ for_each = var. kms_key_arn != null && var . kms_key_arn != " " ? [1 ] : []
156156 content {
157157 sid = " CloudlogsKMSDecrypt"
158158
You can’t perform that action at this time.
0 commit comments