CRITICAL
Source
Trivy
ID
AVD-AZU-0041

Ensure AKS has an API Server Authorized IP Ranges enabled

The API server is the central way to interact with and manage a cluster. To improve cluster security and minimize attacks, the API server should only be accessible from a limited set of IP address ranges.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Limit the access to the API server to a limited IP range

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 resource "azurerm_kubernetes_cluster" "good_example" {
	api_server_access_profile {
		authorized_ip_ranges = [
 		"1.2.3.4/32"
 	]

	}
     
 }