Terraform-aws-eks: can't apply if trying to remove worker_groups_launch_template

Created on 20 May 2020  路  3Comments  路  Source: terraform-aws-modules/terraform-aws-eks

I have issues

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?

when trying to remove a worker_groups_launch_template can't apply, getting the following:
Error: Cycle: module.eks.random_pet.workers_launch_template[2], module.eks.random_pet.workers_launch_template[2] (destroy deposed 2ff3956f), module.eks.aws_launch_template.workers_launch_template[3] (destroy)

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

  1. create an eks instance like in /examples/launch_templates
  2. delete a launch template out of the two
  3. try to apply

What's the expected behavior?

should be able to remove a worker group

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

Environment details

Any other relevant info

stale

Most helpful comment

I have the same issue, but this is not the suggested way to manage old worker groups:

https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md#how-do-i-safely-remove-old-worker-groups

The documentation suggest to set min/max node pool size to 0 and just leave the empty node pool.

Anyway I do agree that node group deletion handling would be a nice feature, but from my (limited) knowledge of the project I guess that the fact that worker_groups_launch_template is handled as a list (shifting index problem) is blocking the implementation of the feature.

All 3 comments

I have the same issue, but this is not the suggested way to manage old worker groups:

https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md#how-do-i-safely-remove-old-worker-groups

The documentation suggest to set min/max node pool size to 0 and just leave the empty node pool.

Anyway I do agree that node group deletion handling would be a nice feature, but from my (limited) knowledge of the project I guess that the fact that worker_groups_launch_template is handled as a list (shifting index problem) is blocking the implementation of the feature.

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.

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

Was this page helpful?
0 / 5 - 0 ratings