Skip to content

Commit bd485d0

Browse files
committed
fix: ensure log group name is null when logging to CloudWatch is disabled to avoid error
1 parent d887003 commit bd485d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.56.0
3+
rev: v1.62.2
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ resource "aws_msk_cluster" "this" {
7272
broker_logs {
7373
cloudwatch_logs {
7474
enabled = var.cloudwatch_logs_enabled
75-
log_group = local.cloudwatch_log_group
75+
log_group = var.cloudwatch_logs_enabled ? local.cloudwatch_log_group : null
7676
}
7777
firehose {
7878
enabled = var.firehose_logs_enabled

0 commit comments

Comments
 (0)