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

Destroy before create? #199

Open
ryanobjc opened this issue Sep 19, 2024 · 0 comments
Open

Destroy before create? #199

ryanobjc opened this issue Sep 19, 2024 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@ryanobjc
Copy link

Describe the Bug

I did an update, and due to tag differences I needed to replace the node group. Terraform duly informed that a 'cbd' would be created and the old one would be destroyed.

TF then went on to... destroy the old nodegroup first. Oops!

Expected Behavior

Create BEFORE destroy!

Steps to Reproduce

Presumably just make a change that triggers the CBD path.

Screenshots

This is the tail end of terraform log:

  # module.eks_cluster.module.eks_node_group.aws_eks_node_group.default[0] will be destroyed
  # (because index [0] is out of range for count)
  - resource "aws_eks_node_group" "default" {

...

  # module.eks_cluster.module.eks_node_group.aws_eks_node_group.cbd[0] will be created
  + resource "aws_eks_node_group" "cbd" {

....

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes
yes

module.eks_cluster.module.eks_node_group.aws_eks_node_group.default[0]: Destroying... [id=venice-use1-dev-cluster:venice-use1-dev-workers]
module.eks_cluster.module.eks_node_group.aws_eks_node_group.default[0]: Still destroying... [id=venice-use1-dev-cluster:venice-use1-dev-workers, 10s elapsed]
module.eks_cluster.module.eks_node_group.aws_eks_node_group.default[0]: Still destroying... [id=venice-use1-dev-cluster:venice-use1-dev-workers, 20s elapsed]
module.eks_cluster.module.eks_node_group.aws_eks_node_group.default[0]: Still destroying... [id=venice-use1-dev-cluster:venice-use1-dev-workers, 30s elapsed]
module.eks_cluster.module.eks_node_group.aws_eks_node_group.default[0]: Still destroying... [id=venice-use1-dev-cluster:venice-use1-dev-workers, 40s elapsed]

Environment

I'm running terraform 1.9.5 on
Darwin m2.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64

I'm using module version 3.1.0

Additional Context

I had configured this nodegroup on a version from about a year ago, hence the tag changes.

@ryanobjc ryanobjc added the bug 🐛 An issue with the system label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant