Terraform-provider-aws: aws_eks_node_group - support for defining ec2 instance name prefix

Created on 18 Mar 2020  ·  3Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

we are deploying several eks clusters in our aws account and noticed the ec2 instances names are empty. This makes it hard for our qa and dev-ops teams to identify which eks cluster an ec2 instance belongs to.
It would be great if we could specify a name prefix for all the ec2 instances spun up by a nodegroup.

New or Affected Resource(s)

aws_eks_node_group

Potential Terraform Configuration

resource "aws_eks_node_group" "staging-service-example" {
  cluster_name    = aws_eks_cluster.example.name
  node_group_name = "example"
  node_role_arn   = aws_iam_role.example.arn
  subnet_ids      = aws_subnet.example[*].id

  # for example something like this
  node_name_prefix = "staging-us-east-1"

  scaling_config {
    desired_size = 1
    max_size     = 1
    min_size     = 1
  }

  depends_on = [
    aws_iam_role_policy_attachment.example-AmazonEKSWorkerNodePolicy,
    aws_iam_role_policy_attachment.example-AmazonEKS_CNI_Policy,
    aws_iam_role_policy_attachment.example-AmazonEC2ContainerRegistryReadOnly,
  ]
}

References

enhancement serviceks upstream

Most helpful comment

We tried to add the tag Name but it did not add anything to the nodes.
Maybe it would be possible to have the additional information be passed to the launch template that is created inside a additional_launch_config block for example. Also allowing to add additional security groups to nodes is not possible and would be very valuable.

additional_launch_config {
  security_groups = ["sg-id123456"]
  tags {
    "Name" = "eks-instance-name"
  }
}

All 3 comments

We tried to add the tag Name but it did not add anything to the nodes.
Maybe it would be possible to have the additional information be passed to the launch template that is created inside a additional_launch_config block for example. Also allowing to add additional security groups to nodes is not possible and would be very valuable.

additional_launch_config {
  security_groups = ["sg-id123456"]
  tags {
    "Name" = "eks-instance-name"
  }
}

Hi folks 👋 Thank you for your interest in this feature request. The EKS API does not implement this functionality, so it is not appropriate for it to be implemented in the Terraform AWS Provider at this time. Rather than keep this issue open and lingering with nothing actionable at the moment, we are going to opt to close this for now. When the API support exists, we will gladly implement it! 😄

In terms of future tracking of this functionality, you may be interested in:

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings