/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: MIT-0 * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # CLUSTER LABELS variable "org" { type = string description = "tenant, which could be your organization name, e.g. aws'" default = "" } variable "tenant" { type = string description = "Account Name or unique account unique id e.g., apps or management or aws007" default = "aws" } variable "environment" { type = string default = "preprod" description = "Environment area, e.g. prod or preprod " } variable "zone" { type = string description = "zone, e.g. dev or qa or load or ops etc..." default = "dev" } variable "terraform_version" { type = string default = "Terraform" description = "Terraform version" } # VPC Config for EKS Cluster variable "vpc_id" { type = string description = "VPC Id" } variable "private_subnet_ids" { description = "List of private subnets Ids for the worker nodes" type = list(string) } variable "public_subnet_ids" { description = "List of public subnets Ids for the worker nodes" type = list(string) default = [] } # EKS CONTROL PLANE variable "create_eks" { type = bool default = false description = "Create EKS cluster" } variable "kubernetes_version" { type = string default = "1.21" description = "Desired kubernetes version. If you do not specify a value, the latest available version is used" } variable "cluster_endpoint_private_access" { type = bool default = false description = "Indicates whether or not the EKS private API server endpoint is enabled. Default to EKS resource and it is false" } variable "cluster_endpoint_public_access" { type = bool default = true description = "Indicates whether or not the EKS public API server endpoint is enabled. Default to EKS resource and it is true" } variable "cluster_log_retention_in_days" { description = "Number of days to retain log events. Default retention - 90 days." type = number default = 90 } variable "enable_irsa" { type = bool default = true description = "Enable IAM Roles for Service Accounts" } variable "cluster_enabled_log_types" { type = list(string) default = ["api", "audit", "authenticator", "controllerManager", "scheduler"] description = "A list of the desired control plane logging to enable" } variable "cluster_log_retention_period" { type = number default = 7 description = "Number of days to retain cluster logs" } variable "worker_additional_security_group_ids" { description = "A list of additional security group ids to attach to worker instances" type = list(string) default = [] } variable "worker_create_security_group" { description = "Whether to create a security group for the workers or attach the workers to `worker_security_group_id`." type = bool default = true } # EKS WORKER NODES variable "managed_node_groups" { description = "Managed node groups configuration" type = any default = {} } variable "self_managed_node_groups" { description = "Self-managed node groups configuration" type = any default = {} } variable "fargate_profiles" { description = "Fargate profile configuration" type = any default = {} } # EKS WINDOWS SUPPORT variable "enable_windows_support" { description = "Enable Windows support" type = bool default = false } # CONFIGMAP AWS-AUTH variable "map_accounts" { description = "Additional AWS account numbers to add to the aws-auth ConfigMap" type = list(string) default = [] } variable "map_roles" { description = "Additional IAM roles to add to the aws-auth ConfigMap" type = list(object({ rolearn = string username = string groups = list(string) })) default = [] } variable "map_users" { description = "Additional IAM users to add to the aws-auth ConfigMap" type = list(object({ userarn = string username = string groups = list(string) })) default = [] } variable "aws_auth_additional_labels" { description = "Additional kubernetes labels applied on aws-auth ConfigMap" default = {} type = map(string) } #-----------Amazon Managed Prometheus------------- variable "enable_amazon_prometheus" { type = bool default = false description = "Enable AWS Managed Prometheus service" } variable "amazon_prometheus_workspace_alias" { type = string default = "" description = "AWS Managed Prometheus WorkSpace Name" } #-----------Amazon EMR on EKS------------- variable "enable_emr_on_eks" { type = bool default = false description = "Enable EMR on EKS" } variable "emr_on_eks_teams" { description = "EMR on EKS Teams config" type = any default = {} } #-----------TEAMS------------- variable "application_teams" { description = "Map of maps of Application Teams to create" type = any default = {} } variable "platform_teams" { description = "Map of maps of platform teams to create" type = any default = {} } variable "eks_cluster_id" { description = "EKS Cluster Id" } variable "eks_worker_security_group_id" { description = "EKS Worker Security group Id created by EKS module" default = "" } variable "eks_oidc_issuer_url" { description = "The URL on the EKS cluster OIDC Issuer" default = "" } variable "eks_oidc_provider_arn" { description = "The ARN of the OIDC Provider if `enable_irsa = true`." default = "" } variable "auto_scaling_group_names" { description = "List of self-managed node groups autoscaling group names" default = [] } variable "node_groups_iam_role_arn" { type = list(string) default = [] } variable "tags" { type = map(string) default = {} description = "Additional tags (e.g. `map('BusinessUnit`,`XYZ`)" } #-----------EKS MANAGED ADD-ONS------------ variable "amazon_eks_vpc_cni_config" { description = "ConfigMap of Amazon EKS VPC CNI add-on" type = any default = {} } variable "amazon_eks_coredns_config" { description = "ConfigMap for Amazon CoreDNS EKS add-on" type = any default = {} } variable "amazon_eks_kube_proxy_config" { description = "ConfigMap for Amazon EKS Kube-Proxy add-on" type = any default = {} } variable "amazon_eks_aws_ebs_csi_driver_config" { description = "configMap for AWS EBS CSI Driver add-on" type = any default = {} } variable "enable_amazon_eks_vpc_cni" { type = bool default = false description = "Enable VPC CNI add-on" } variable "enable_amazon_eks_coredns" { type = bool default = false description = "Enable CoreDNS add-on" } variable "enable_amazon_eks_kube_proxy" { type = bool default = false description = "Enable Kube Proxy add-on" } variable "enable_amazon_eks_aws_ebs_csi_driver" { type = bool default = false description = "Enable EKS Managed AWS EBS CSI Driver add-on" } #-----------CLUSTER AUTOSCALER------------- variable "enable_cluster_autoscaler" { type = bool default = false description = "Enable Cluster autoscaler add-on" } variable "cluster_autoscaler_helm_config" { type = any default = {} description = "Cluster Autoscaler Helm Chart config" } #-----------Amazon Managed Service for Prometheus------------- variable "aws_managed_prometheus_ingest_iam_role_arn" { type = string default = "" description = "AWS Managed Prometheus WorkSpaceSpace IAM role ARN" } variable "aws_managed_prometheus_ingest_service_account" { type = string default = "" description = "AWS Managed Prometheus Ingest Service Account" } #-----------PROMETHEUS------------- variable "enable_prometheus" { description = "Enable Community Prometheus add-on" type = bool default = false } variable "prometheus_helm_config" { description = "Community Prometheus Helm Chart config" type = any default = {} } #-----------METRIC SERVER------------- variable "enable_metrics_server" { type = bool default = false description = "Enable metrics server add-on" } variable "metrics_server_helm_config" { type = any default = {} description = "Metrics Server Helm Chart config" } #-----------TRAEFIK------------- variable "enable_traefik" { type = bool default = false description = "Enable Traefik add-on" } variable "traefik_helm_config" { type = any default = {} description = "Traefik Helm Chart config" } #-----------AGONES------------- variable "enable_agones" { type = bool default = false description = "Enable Agones GamServer add-on" } variable "agones_helm_config" { type = any default = {} description = "Agones GameServer Helm Chart config" } #-----------AWS LB Ingress Controller------------- variable "enable_aws_load_balancer_controller" { type = bool default = false description = "Enable AWS Load Balancer Controller add-on" } variable "aws_load_balancer_controller_helm_config" { type = any description = "AWS Load Balancer Controller Helm Chart config" default = {} } #-----------NGINX------------- variable "enable_ingress_nginx" { type = bool default = false description = "Enable Ingress Nginx add-on" } variable "ingress_nginx_helm_config" { description = "Ingress Nginx Helm Chart config" type = any default = {} } #-----------SPARK K8S OPERATOR------------- variable "enable_spark_k8s_operator" { type = bool default = false description = "Enable Spark on K8s Operator add-on" } variable "spark_k8s_operator_helm_config" { description = "Spark on K8s Operator Helm Chart config" type = any default = {} } #-----------AWS FOR FLUENT BIT------------- variable "enable_aws_for_fluentbit" { type = bool default = false description = "Enable AWS for FluentBit add-on" } variable "aws_for_fluentbit_helm_config" { type = any description = "AWS for FluentBit Helm Chart config" default = {} } #-----------FARGATE FLUENT BIT------------- variable "enable_fargate_fluentbit" { type = bool default = false description = "Enable Fargate FluentBit add-on" } variable "fargate_fluentbit_addon_config" { type = any description = "Fargate fluentbit add-on config" default = {} } #-----------CERT MANAGER------------- variable "enable_cert_manager" { type = bool default = false description = "Enable Cert Manager add-on" } variable "cert_manager_helm_config" { type = any description = "Cert Manager Helm Chart config" default = {} } #-----------AWS OPEN TELEMETRY ADDON------------- variable "enable_aws_open_telemetry" { type = bool default = false description = "Enable AWS Open Telemetry Distro add-on" } variable "aws_open_telemetry_addon_config" { type = any default = {} description = "AWS Open Telemetry Distro add-on config" } #-----------ARGOCD ADDON------------- variable "enable_argocd" { type = bool default = false description = "Enable Argo CD Kubernetes add-on" } variable "argocd_helm_config" { type = any default = {} description = "Argo CD Kubernetes add-on config" } variable "argocd_applications" { type = any default = {} description = "Argo CD Applications config to bootstrap the cluster" } variable "argocd_manage_add_ons" { type = bool default = false description = "Enable managing add-on configuration via ArgoCD" } #-----------AWS NODE TERMINATION HANDLER------------- variable "enable_aws_node_termination_handler" { type = bool default = false description = "Enable AWS Node Termination Handler add-on" } variable "aws_node_termination_handler_helm_config" { type = any description = "AWS Node Termination Handler Helm Chart config" default = {} } #-----------KEDA ADDON------------- variable "enable_keda" { type = bool default = false description = "Enable KEDA Event-based autoscaler add-on" } variable "keda_helm_config" { type = any default = {} description = "KEDA Event-based autoscaler add-on config" } variable "keda_create_irsa" { type = bool description = "Indicates if the add-on should create a IAM role + service account" default = true } variable "keda_irsa_policies" { type = list(string) description = "Additional IAM policies for a IAM role for service accounts" default = [] } #-----------Vertical Pod Autoscaler(VPA) ADDON------------- variable "enable_vpa" { type = bool default = false description = "Enable Kubernetes Vertical Pod Autoscaler add-on" } variable "vpa_helm_config" { type = any default = {} description = "Vertical Pod Autoscaler Helm Chart config" } #-----------Apache YuniKorn ADDON------------- variable "enable_yunikorn" { type = bool default = false description = "Enable Apache YuniKorn K8s scheduler add-on" } variable "yunikorn_helm_config" { type = any default = {} description = "YuniKorn K8s scheduler Helm Chart config" }