-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_emr_instance_group can't be destroyed #1355
Comments
Any updates? We are seeing same behaviour with |
I recently observed this behavior on AWS. The work around (through the AWS Cloud Formation console) is when deleting the stack, opt to retain the resource (in this case the aws_emr_instance_group) that prevented the successful deletion of the stack. Then the delete of the stack can continue successfully. |
if the cluster with that task group is deleted, you can use terraform state rm to delete that entry from terraform state, and rerun your terraform to create cluster. |
In situations where Terraform needs to replace an aws_emr_cluster resource that has aws_emr_instance_group resources associated with it, Terraform tries to execute a destroy on the instance group, but it fails as the notion of a "destroy" on an instance group is to set the number of instances to zero, but AWS doesn't let you modify the count of instances in an instance group on an EMR cluster. This fixes the issue by treating an instance group that has been terminated as no longer existing, so Terraform won't try to execute a "destroy" and not error out. Fixes #1355 Fixes #9400
The fix for this has been merged and will release with version 2.32.0 of the Terraform AWS Provider, later today. Thanks to @joelthompson for the implementation. 🎉 |
This has been released in version 2.32.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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! |
Given a definition like below:
If the EMR cluster is being destroyed successfully the instance group is getting into a limbo and can't be destroyed via terraform, giving the following error:
From what I can gather the issue is with the IG not being removed before the cluster is destroyed.
Using latest terraform (Terraform v0.10.0)
The text was updated successfully, but these errors were encountered: