github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/avd_docs/aws/eks/AVD-AWS-0041/Terraform.md (about)

     1  
     2  Don't enable public access to EKS Clusters
     3  
     4  ```hcl
     5   resource "aws_eks_cluster" "good_example" {
     6       // other config 
     7   
     8       name = "good_example_cluster"
     9       role_arn = var.cluster_arn
    10       vpc_config {
    11           endpoint_public_access = true
    12           public_access_cidrs = ["10.2.0.0/8"]
    13       }
    14   }
    15   
    16  ```
    17  
    18  #### Remediation Links
    19   - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster#vpc_config
    20