terraform-azurerm-caf-enterprise-scale
terraform-azurerm-caf-enterprise-scale copied to clipboard
"Enable allLogs category group resource logging for supported resources to Log Analytics" creates duplicate logs for Application Insights already using a Log Analytics Workspace
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Versions
module: 6.0.0
Description
Describe the bug
I already have an Application Insights resource which is using a Log Analytics workspace configured via the WORKSPACE config option (actually configured via azurerm_application_insights/workspace_id). This sends all logs to the Log Analytics workspace. I believe this configuration can not be removed.
If I remediate the policy "Enable allLogs category group resource logging for supported resources to Log Analytics" it creates a Diagnostic Setting "setByPolicy-LogAnalytics" for the Application Insights resource which also sends all logs to the Log Analytics workspace. Hence duplicate logs are stored in the Log Analytics workspace.