MEDIUM
Source
Trivy
ID
AVD-GCP-0059

Clusters should be set to private

Enabling private nodes on a cluster ensures the nodes are only available internally as they will only be assigned internal addresses.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Enable private cluster

1
2
3
4
5
6
7
resource "google_container_cluster" "good_example" {
  name     = "my-gke-cluster"
  location = "us-central1"
  private_cluster_config {
    enable_private_nodes = true
  }
}