{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-eks-cluster.json",
  "title": "AWSEKSClusterProperties",
  "description": "An object representing an Amazon EKS cluster.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-eks.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-eks-cluster.json",
    "sourceSha256": "0a4313b9733230a98a1916c20587f412fe2baaa7014bd2829eeaa20a0b5b70ca"
  },
  "type": "object",
  "properties": {
    "EncryptionConfig": {
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/EncryptionConfig",
        "maxItems": 1
      }
    },
    "KubernetesNetworkConfig": {
      "$ref": "#/$defs/KubernetesNetworkConfig"
    },
    "Logging": {
      "$ref": "#/$defs/Logging"
    },
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[0-9A-Za-z][A-Za-z0-9\\-_]*",
          "minLength": 1,
          "maxLength": 100
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The unique name to give to your cluster."
    },
    "ResourcesVpcConfig": {
      "$ref": "#/$defs/ResourcesVpcConfig"
    },
    "OutpostConfig": {
      "$ref": "#/$defs/OutpostConfig"
    },
    "RoleArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf."
    },
    "Version": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "1\\.\\d\\d"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used."
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::EKS::Cluster",
  "readOnlyProperties": [
    "/properties/Id",
    "/properties/Arn",
    "/properties/Endpoint",
    "/properties/CertificateAuthorityData",
    "/properties/ClusterSecurityGroupId",
    "/properties/EncryptionConfigKeyArn",
    "/properties/OpenIdConnectIssuerUrl",
    "/properties/KubernetesNetworkConfig/ServiceIpv6Cidr"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-eks.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/OutpostConfig",
    "/properties/EncryptionConfig",
    "/properties/KubernetesNetworkConfig",
    "/properties/Name",
    "/properties/RoleArn",
    "/properties/ResourcesVpcConfig/SubnetIds",
    "/properties/ResourcesVpcConfig/SecurityGroupIds"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "$defs": {
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSEKSClusterTagDefinition",
      "additionalProperties": false
    },
    "Provider": {
      "type": "object",
      "title": "AWSEKSClusterProviderDefinition",
      "properties": {
        "KeyArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Amazon Resource Name (ARN) or alias of the KMS key. The KMS key must be symmetric, created in the same region as the cluster, and if the KMS key was created in a different account, the user must have access to the KMS key."
        }
      },
      "additionalProperties": false
    },
    "EncryptionConfig": {
      "description": "The encryption configuration for the cluster",
      "type": "object",
      "properties": {
        "Provider": {
          "description": "The encryption provider for the cluster.",
          "$ref": "#/$defs/Provider"
        },
        "Resources": {
          "description": "Specifies the resources to be encrypted. The only supported value is \"secrets\".",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string"
          }
        }
      },
      "title": "AWSEKSClusterEncryptionConfigDefinition",
      "additionalProperties": false
    },
    "ResourcesVpcConfig": {
      "description": "An object representing the VPC configuration to use for an Amazon EKS cluster.",
      "type": "object",
      "title": "AWSEKSClusterResourcesVpcConfigDefinition",
      "properties": {
        "EndpointPrivateAccess": {
          "description": "Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false, which disables private access for your Kubernetes API server. If you disable private access and you have nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the nodes or Fargate pods.",
          "type": "boolean"
        },
        "EndpointPublicAccess": {
          "description": "Set this value to false to disable public access to your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true, which enables public access for your Kubernetes API server.",
          "type": "boolean"
        },
        "PublicAccessCidrs": {
          "description": "The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0. If you've disabled private endpoint access and you have nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string",
            "minItems": 1
          }
        },
        "SecurityGroupIds": {
          "description": "Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you don't specify a security group, the default security group for your VPC is used.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string",
            "minItems": 1
          }
        },
        "SubnetIds": {
          "description": "Specify subnets for your Amazon EKS nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your nodes and the Kubernetes control plane.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string",
            "minItems": 1
          }
        }
      },
      "required": [
        "SubnetIds"
      ],
      "additionalProperties": false
    },
    "LoggingTypeConfig": {
      "description": "Enabled Logging Type",
      "type": "object",
      "properties": {
        "Type": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "api",
                "audit",
                "authenticator",
                "controllerManager",
                "scheduler"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "name of the log type"
        }
      },
      "title": "AWSEKSClusterLoggingTypeConfigDefinition",
      "additionalProperties": false
    },
    "EnabledTypes": {
      "description": "Enable control plane logs for your cluster, all log types will be disabled if the array is empty",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/LoggingTypeConfig"
      },
      "title": "AWSEKSClusterEnabledTypesDefinition"
    },
    "ClusterLogging": {
      "description": "The cluster control plane logging configuration for your cluster. ",
      "type": "object",
      "title": "AWSEKSClusterClusterLoggingDefinition",
      "properties": {
        "EnabledTypes": {
          "$ref": "#/$defs/EnabledTypes"
        }
      },
      "additionalProperties": false
    },
    "Logging": {
      "description": "Enable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs based on log types. By default, cluster control plane logs aren't exported to CloudWatch Logs.",
      "type": "object",
      "title": "AWSEKSClusterLoggingDefinition",
      "properties": {
        "ClusterLogging": {
          "description": "The cluster control plane logging configuration for your cluster. ",
          "$ref": "#/$defs/ClusterLogging"
        }
      },
      "additionalProperties": false
    },
    "KubernetesNetworkConfig": {
      "description": "The Kubernetes network configuration for the cluster.",
      "title": "AWSEKSClusterKubernetesNetworkConfigDefinition",
      "type": "object",
      "properties": {
        "ServiceIpv4Cidr": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The CIDR block to assign Kubernetes service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks. We recommend that you specify a block that does not overlap with resources in other networks that are peered or connected to your VPC. "
        },
        "ServiceIpv6Cidr": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The CIDR block to assign Kubernetes service IP addresses from."
        },
        "IpFamily": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "ipv4",
                "ipv6"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Ipv4 or Ipv6. You can only specify ipv6 for 1.21 and later clusters that use version 1.10.1 or later of the Amazon VPC CNI add-on"
        }
      },
      "additionalProperties": false
    },
    "ControlPlanePlacement": {
      "description": "Specify the placement group of the control plane machines for your cluster.",
      "type": "object",
      "title": "AWSEKSClusterControlPlanePlacementDefinition",
      "properties": {
        "GroupName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Specify the placement group name of the control place machines for your cluster."
        }
      },
      "additionalProperties": false
    },
    "OutpostConfig": {
      "description": "An object representing the Outpost configuration to use for AWS EKS outpost cluster.",
      "title": "AWSEKSClusterOutpostConfigDefinition",
      "type": "object",
      "properties": {
        "OutpostArns": {
          "description": "Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string",
            "minItems": 1
          }
        },
        "ControlPlaneInstanceType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Specify the Instance type of the machines that should be used to create your cluster."
        },
        "ControlPlanePlacement": {
          "description": "Specify the placement group of the control plane machines for your cluster.",
          "$ref": "#/$defs/ControlPlanePlacement"
        }
      },
      "required": [
        "OutpostArns",
        "ControlPlaneInstanceType"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "RoleArn",
    "ResourcesVpcConfig"
  ],
  "primaryIdentifier": [
    "/properties/Name"
  ]
}
