HIGH
Source
Trivy
ID
AVD-GCP-0053

GKE Control Plane should not be publicly accessible

The GKE control plane is exposed to the public internet by default.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Use private nodes and master authorised networks to prevent exposure

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
resource "google_container_cluster" "good_example" {
  name     = "my-gke-cluster"
  location = "us-central1"
  master_authorized_networks_config {
    cidr_blocks {
      cidr_block   = "10.10.128.0/24"
      display_name = "internal"
    }
  }
}