Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fails to replace a node group (for adding a launch template) with "NodeGroup already exists with name internal-t2_medium and cluster name development-pod01" #1191

Closed
2 of 4 tasks
dresnick-sf opened this issue Jan 21, 2021 · 4 comments
Labels

Comments

@dresnick-sf
Copy link

I have issues

I'm submitting a...

  • bug report
  • feature request
  • support request - read the FAQ first!
  • kudos, thank you, warm fuzzy

What is the current behavior?

Node group replacement fails with "Error: error creating EKS Node Group (clustername:nodegroupname): ResourceInUseException: NodeGroup already exists with name nodegroupname and cluster name clustername"

Terraform plan indicates that the node groups need to be replaced:

Resource actions are indicated with the following symbols:
+ create
+/- create replacement and then destroy

...

  # module.eks.module.eks.module.node_groups.aws_eks_node_group.workers["1"] must be replaced
+/- resource "aws_eks_node_group" "workers" {
...

  # module.eks.module.eks.module.node_groups.random_pet.node_groups["1"] must be replaced
+/- resource "random_pet" "node_groups" {

Application of the plan fails

module.eks.module.eks.module.node_groups.random_pet.node_groups["1"]: Creating...
module.eks.module.eks.module.node_groups.random_pet.node_groups["1"]: Creation complete after 0s [id=immortal-parrot]
module.eks.module.eks.module.node_groups.aws_eks_node_group.workers["1"]: Creating...

Error: error creating EKS Node Group (clustername:nodegroupname): ResourceInUseException: NodeGroup already exists with name nodegroupname and cluster name clustername
{
  RespMetadata: {
    StatusCode: 409,
    RequestID: "abc"
  },
  ClusterName: "clustername",
  Message_: "NodeGroup already exists with name nodegroupname and cluster name clustername",
  NodegroupName: "nodegroupname"
}

If this is a bug, how to reproduce? Please include a code sample if relevant.

I added a launch template to the definition of an existing node group by adding this:

      launch_template_id      = aws_launch_template.default.id
      launch_template_version = aws_launch_template.default.default_version

What's the expected behavior?

The node group is replaced and the new node group has a launch template.

Are you able to fix this problem and submit a PR? Link here if you have already.

Environment details

  • Affected module version:
    terraform-aws-modules/eks/aws: 13.2.1
    kubernetes/1.13.3
    local/2.0.0
    null/3.0.0
    template/2.2.0
    random/3.0.1
    aws/3.24.1

  • OS: amazon linux 2

  • Terraform version: 0.14.2

Any other relevant info

@dresnick-sf
Copy link
Author

This might be related to #1152

@stale
Copy link

stale bot commented Apr 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 22, 2021
@stale
Copy link

stale bot commented May 23, 2021

This issue has been automatically closed because it has not had recent activity since being marked as stale.

@stale stale bot closed this as completed May 23, 2021
@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant