MEDIUM
Source
Trivy
ID
AVD-AZU-0040

Ensure AKS logging to Azure Monitoring is Configured

Ensure AKS logging to Azure Monitoring is configured for containers to monitor the performance of workloads.

Impact

Logging provides valuable information about access and usage

Follow the appropriate remediation steps below to resolve the issue.

Enable logging for AKS

1
2
3
4
5
6
7
8
 resource "azurerm_kubernetes_cluster" "good_example" {
     addon_profile {
 		oms_agent {
 			enabled = true
 		}
 	}
 }
 
1
2
3
4
5
6
 resource "azurerm_kubernetes_cluster" "good_example" {
 		oms_agent {
			log_analytics_workspace_id = "whatever"
 		}
 }