EKS Endpoint No Public Access High

Amazon Elastic Kubernetes Service (Amazon EKS) endpoint is publicly accessible. Ensure it is not publicly accessible.

Detector ID
cloudformation/checkov-custom-eks-endpoint-public-access@v1.0
Category
Common Weakness Enumeration (CWE) external icon
-

Noncompliant example

1Resources:
2  ExampleEKSCluster:
3    Type: "AWS::EKS::Cluster"
4    Properties:
5      ResourcesVpcConfig:
6        SubnetIds: !Ref SubnetIds
7        # Noncompliant: `EndpointPublicAccess` is set to `true`.
8        EndpointPublicAccess: true
9      RoleArn: !Ref RoleArn
10      EncryptionConfig:
11        - Resources:
12            - secrets

Compliant example

1Resources:
2  ExampleEKSCluster:
3    Type: "AWS::EKS::Cluster"
4    Properties:
5      ResourcesVpcConfig:
6        SubnetIds: !Ref SubnetIds
7        # Compliant: `EndpointPublicAccess` is set to `false`.
8        EndpointPublicAccess: false
9      RoleArn: !Ref RoleArn
10      EncryptionConfig:
11        - Resources:
12            - secrets