diff --git a/modules/cognitive-services/src/main.tf b/modules/cognitive-services/src/main.tf index 7e809f0..c024194 100644 --- a/modules/cognitive-services/src/main.tf +++ b/modules/cognitive-services/src/main.tf @@ -46,13 +46,21 @@ resource "azurerm_monitor_diagnostic_setting" "main" { log_analytics_workspace_id = var.log_analytics_workspace_id dynamic "enabled_log" { - for_each = var.log_category_groups + for_each = var.log_categories content { category = enabled_log.value } } + dynamic "enabled_log" { + for_each = var.log_category_groups + + content { + category_group = enabled_log.value + } + } + dynamic "metric" { for_each = var.metric_categories