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

Cycle when removing first item of worker_groups_launch_template list #993

Closed
3 tasks
codingthecloud opened this issue Aug 28, 2020 · 3 comments · Fixed by #1043
Closed
3 tasks

Cycle when removing first item of worker_groups_launch_template list #993

codingthecloud opened this issue Aug 28, 2020 · 3 comments · Fixed by #1043

Comments

@codingthecloud
Copy link

codingthecloud commented Aug 28, 2020

I have issues

Hi, I am having an issue whenever I try to delete the first item of the worker_groups_launch_template list. Could anybody tell me why it is behaving like this?

I get the below error:
Error: Cycle: module.eks.aws_launch_template.workers_launch_template[1] (destroy), module.eks.random_pet.workers_launch_template[1] (destroy), module.eks.aws_launch_template.workers_launch_template[0] (destroy deposed 630f0acb), module.eks.aws_iam_instance_profile.workers_launch_template[1] (destroy), module.eks.aws_launch_template.workers_launch_template[0], module.eks.random_pet.workers_launch_template[0], module.eks.aws_autoscaling_group.workers_launch_template[0], module.eks.aws_autoscaling_group.workers_launch_template[0] (destroy deposed 93527070), module.eks.random_pet.workers_launch_template[0] (destroy deposed ad930592)

I'm submitting a...

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

What is the current behavior?

Given:

worker_groups_launch_template =  [
     { --> I tried removing this element
         additional_security_group_ids = [
             "sg-id1"
          ]
         asg_desired_capacity          = 1
         asg_max_size                  = 5
         instance_type                 = "t2.medium"
         name                          = "application"

         subnets                       = [
             "subnet-id1","subnet-id2",
          ]
      },
     {
         additional_security_group_ids = [
             "sg-id2",
          ]
         asg_desired_capacity          = 1
         asg_max_size                  = 5
         instance_type                 = "t2.small"
         name                          = "monitoring"

         subnets                       = [
             "subnet-id1","subnet-id2",
          ]
      },
  ]

If I delete the first item from the list. I get the Cycle error.

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

Create a list of worker_groups_launch_template and delete the first item in the array.

What's the expected behavior?

Recreate the node groups correctly.

Environment details

  • Affected module version: eks
  • OS: Amazon Linux 2 Ami
  • Terraform version: 0.13.1

Any other relevant info

@daganida88
Copy link

Having the same issue.

@barryib
Copy link
Member

barryib commented Oct 8, 2020

@daganida88 @codingthecloud Can you please have a look at #1043 and tell me if it solves your issue.

BTW, keep in mind that changing the order of workers group is a destructive operation. All workers group are destroyed and recreated. If you want to do this safely, you should move then in state with terraform state mv.

This will be fixed when we use map instead of list for workers groups. There is an ongoing PR #858 for that.

@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 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants