Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions terraform-modules/movement-validator-infra/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ resource "aws_eks_cluster" "main" {
role_arn = aws_iam_role.cluster.arn
version = var.kubernetes_version

access_config {
authentication_mode = var.cluster_authentication_mode
bootstrap_cluster_creator_admin_permissions = true
}

vpc_config {
subnet_ids = local.control_plane_subnet_ids
endpoint_private_access = true
Expand Down
11 changes: 11 additions & 0 deletions terraform-modules/movement-validator-infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ variable "kubernetes_version" {
default = "1.35"
}

variable "cluster_authentication_mode" {
description = "EKS cluster authentication mode. One of CONFIG_MAP (legacy, aws-auth ConfigMap only), API_AND_CONFIG_MAP (recommended; supports both AWS Access Entries and aws-auth), or API (Access Entries only). Switching is one-way: CONFIG_MAP → API_AND_CONFIG_MAP → API."
type = string
default = "API_AND_CONFIG_MAP"

validation {
condition = contains(["CONFIG_MAP", "API_AND_CONFIG_MAP", "API"], var.cluster_authentication_mode)
error_message = "cluster_authentication_mode must be one of CONFIG_MAP, API_AND_CONFIG_MAP, or API."
}
}

variable "private_subnet_ids" {
description = "Private subnet IDs for node group"
type = list(string)
Expand Down
Loading