Defines an EKS cluster with advanced access configurations, including authentication mode and bootstrap permissions.

Terraform Template

resource "aws_eks_cluster" "example" {

  access_config {
    authentication_mode = "CONFIG_MAP"
    bootstrap_cluster_creator_admin_permissions = true
  }
  name = "example-cluster"
  role_arn = aws_iam_role.example.arn

  vpc_config {
    endpoint_private_access = true
    endpoint_public_access = false
  }
}

resource "aws_iam_role" "example" {
  assume_role_policy = "data.aws_iam_policy_document.example_assume_role_policy.json"
  name = "example"
}