Skip to content

Commit

Permalink
fix: Conditionally create logging config
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewCharlesHay authored Jan 29, 2024
1 parent 9e3798e commit e9d280b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ resource "aws_lambda_function" "this" {
}
}

logging_config {
dynamic "logging_config" {
# Dont create logging config on gov cloud as it is not avaible. See https://github.com/hashicorp/terraform-provider-aws/issues/34810
count = data.aws_partition.current.partition == "aws" ? [true] : []

log_group = var.logging_log_group
log_format = var.logging_log_format
application_log_level = var.logging_application_log_level
Expand Down

0 comments on commit e9d280b

Please sign in to comment.