Skip to content

Instantly share code, notes, and snippets.

@phivid
Last active December 2, 2019 22:54
Show Gist options
  • Save phivid/5297f4437265178201d23a0d37e1acf4 to your computer and use it in GitHub Desktop.
Save phivid/5297f4437265178201d23a0d37e1acf4 to your computer and use it in GitHub Desktop.
terraform_eks_node
resource "aws_eks_node_group" "example" {
for_each = data.aws_subnet_ids.example.ids // la liste des subnets privés créés dans le projet Terraform base.
cluster_name = aws_eks_cluster.example.name
node_group_name = "example-${substr(each.key, 7, length(each.key))}"
node_role_arn = aws_iam_role.eks-node.arn
subnet_ids = [each.key]
scaling_config {
desired_size = 1
max_size = 3
min_size = 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment