Skip to content

Commit

Permalink
fix: error when creating cloudwatch logs (#14)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dchocoboo and David authored Jul 25, 2022
1 parent 133d1b4 commit 1d0f883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 1d0f883

Please sign in to comment.