eks-cluster
Creates an EKS control plane with IAM roles, add-ons, OIDC, secrets encryption, and access entries.
Provisions an EKS cluster with a dedicated cluster IAM role, control plane logging to CloudWatch, optional KMS secrets encryption, private-only API access, core add-ons (VPC CNI, CoreDNS, kube-proxy, EBS CSI driver), and access entries with policy associations using the EKS API authentication mode. OIDC issuer URL is output for IRSA via the identity/iam-identity-provider module.
Usage
module "eks" {
source = "hcassc.jfrog.io/iac-terraform-modules-virtual/compute/eks-cluster/aws"
version = "0.1.0"
cluster_name = "prod-eks"
kubernetes_version = "1.30"
subnet_ids = module.vpc.private_subnet_id_list
secrets_encryption_kms_key_arn = module.kms.key_arn
}
Requirements
Providers
Resources
| Name |
Description |
Type |
Default |
Required |
| cluster_name |
EKS cluster name |
string |
n/a |
yes |
| subnet_ids |
Subnet IDs for the cluster control plane ENIs |
list(string) |
n/a |
yes |
| access_entries |
Map of IAM principal ARNs to cluster access entry configurations |
map(object({ principal_arn = string type = optional(string, "STANDARD") kubernetes_groups = optional(list(string), []) policy_associations = optional(list(object({ policy_arn = string access_scope = optional(string, "cluster") namespaces = optional(list(string), []) })), []) })) |
{} |
no |
| cluster_addons |
Map of EKS add-ons to install |
map(object({ version = optional(string, null) resolve_conflicts = optional(string, "OVERWRITE") service_account_role_arn = optional(string, null) })) |
{ "aws-ebs-csi-driver": {}, "coredns": {}, "kube-proxy": {}, "vpc-cni": {}} |
no |
| cluster_log_types |
Control plane log types to enable |
list(string) |
[ "api", "audit", "authenticator", "controllerManager", "scheduler"] |
no |
| endpoint_private_access |
Enable private API server endpoint |
bool |
true |
no |
| endpoint_public_access |
Enable public API server endpoint |
bool |
false |
no |
| kubernetes_version |
Kubernetes version |
string |
"1.30" |
no |
| public_access_cidrs |
CIDR blocks for public API access (requires endpoint_public_access = true) |
list(string) |
[] |
no |
| secrets_encryption_kms_key_arn |
KMS key ARN for encrypting Kubernetes secrets |
string |
null |
no |
| security_group_ids |
Additional security group IDs for the cluster |
list(string) |
[] |
no |
| tags |
Resource tags to apply to all resources |
map(string) |
{} |
no |
Outputs