This template retrieves information about an AWS EKS Cluster including the endpoint, certificate authority data, and OIDC issuer.

Terraform Template

data "aws_eks_cluster" "example" {
  name = "example"
}

output "endpoint" {
  value = data.aws_eks_cluster.example.endpoint
}

output "identity-oidc-issuer" {
  value = "data.aws_eks_cluster.example.identity[0].oidc[0].issuer"
}

output "kubeconfig-certificate-authority-data" {
  value = "data.aws_eks_cluster.example.certificate_authority[0].data"
}