From 1d0f883814c3adbbece1f81e7670c56dfb4b0b0c Mon Sep 17 00:00:00 2001 From: dchocoboo <86618807+dchocoboo@users.noreply.github.com> Date: Mon, 25 Jul 2022 17:10:39 +0800 Subject: [PATCH] fix: error when creating cloudwatch logs (#14) when create_kms_key enabled, it should be arn not the key id to be referenced to the cloudwatch log group block Co-authored-by: David --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 92f38fe..d6ccde0 100644 --- a/main.tf +++ b/main.tf @@ -22,7 +22,7 @@ resource "aws_kms_key" "encryption_key" { resource "aws_cloudwatch_log_group" "log_group" { name = var.logs_path retention_in_days = var.log_group_retention_in_days - kms_key_id = var.create_kms_key ? aws_kms_key.encryption_key[0].key_id : var.log_group_kms_key_id + kms_key_id = var.create_kms_key ? aws_kms_key.encryption_key[0].arn : var.log_group_kms_key_id tags = var.tags }