When I choose “allLogs” in diagnostic category I get the error that diagnostic settings does not support category group - allLogs. Does it imply that if I want to capture all the logs I have to include every category for the resource? or is there a workaround for that?
resource "azurerm_monitor_diagnostic_setting" "logs" {
name = "Logs to Central Storage account"
target_resource_id = data.azurerm_key_vault.example.id
storage_account_id = data.azurerm_storage_account.example.id
log {
category = "AuditEvent"
enabled = true
retention_policy {
enabled = true
}
}
log {
category = "AzurePolicyEvaluationDetails"
enabled = true
retention_policy {
enabled = true
}
}
metric {
category = "AllMetrics"
retention_policy {
enabled = true
}
}
}