You must be logged in to view saved presets
This template sets up a basic EKS cluster with specified subnet IDs and IAM role dependencies.
resource "aws_eks_cluster" "example" {
depends_on = ["aws_iam_role_policy_attachment.example-AmazonEKSClusterPolicy", "aws_iam_role_policy_attachment.example-AmazonEKSVPCResourceController"]
name = "example"
role_arn = "aws_iam_role.example.arn"
vpc_config {
subnet_ids = ["aws_subnet.example1.id", "aws_subnet.example2.id"]
}
}
output "endpoint" {
value = aws_eks_cluster.example.endpoint
}
output "kubeconfig-certificate-authority-data" {
value = "aws_eks_cluster.example.certificate_authority[0].data"
}