File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,17 @@ resource "aws_lambda_function" "this" {
112112 }
113113 }
114114
115- logging_config {
116- log_group = var. logging_log_group
117- log_format = var. logging_log_format
118- application_log_level = var. logging_application_log_level
119- system_log_level = var. logging_system_log_level
115+ dynamic "logging_config" {
116+ # Dont create logging config on gov cloud as it is not avaible.
117+ # See https://github.com/hashicorp/terraform-provider-aws/issues/34810
118+ for_each = data. aws_partition . current . partition == " aws" ? [true ] : []
119+
120+ content {
121+ log_group = var. logging_log_group
122+ log_format = var. logging_log_format
123+ application_log_level = var. logging_application_log_level
124+ system_log_level = var. logging_system_log_level
125+ }
120126 }
121127
122128 dynamic "timeouts" {
You can’t perform that action at this time.
0 commit comments