github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/eks/no_public_cluster_access.tf.go (about) 1 package eks 2 3 var terraformNoPublicClusterAccessGoodExamples = []string{ 4 ` 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 = false 12 } 13 } 14 `, 15 } 16 17 var terraformNoPublicClusterAccessBadExamples = []string{ 18 ` 19 resource "aws_eks_cluster" "bad_example" { 20 // other config 21 22 name = "bad_example_cluster" 23 role_arn = var.cluster_arn 24 vpc_config { 25 endpoint_public_access = true 26 public_access_cidrs = ["0.0.0.0/0"] 27 } 28 } 29 `, 30 } 31 32 var terraformNoPublicClusterAccessLinks = []string{ 33 `https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster#endpoint_public_access`, 34 } 35 36 var terraformNoPublicClusterAccessRemediationMarkdown = ``