Skip to content

Instantly share code, notes, and snippets.

@blogumi
Created April 4, 2020 18:54
Show Gist options
  • Save blogumi/f826696611a69b9cfac936b203b0e4a3 to your computer and use it in GitHub Desktop.
Save blogumi/f826696611a69b9cfac936b203b0e4a3 to your computer and use it in GitHub Desktop.
This resource is the actual Kubernetes master cluster. It can take a few minutes to provision in AWS.
resource "aws_eks_cluster" "demo" {
name = "${var.cluster-name}"
role_arn = "${aws_iam_role.demo-node.arn}"
vpc_config {
security_group_ids = ["${aws_security_group.demo-cluster.id}"]
subnet_ids = ["${aws_subnet.demo.*.id}"]
}
depends_on = [
"aws_iam_role_policy_attachment.demo-cluster-AmazonEKSClusterPolicy",
"aws_iam_role_policy_attachment.demo-cluster-AmazonEKSServicePolicy",
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment