-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[EMR] ValidationException: An instance group may only be modified when the cluster is running or waiting #9400
Comments
I am also facing this same issue, do we have any work around? |
Terraform Version: I have the same problem. Whilst performing my investigation, I will update this answer with more details. If you need more details than below, please let me know. In our scenario, we use an EMR cluster with instance groups. This cluster creation is defined in a Terraform module so we try to be as DRY as possible. After the job finishes, the EMR cluster itself will terminate as well.
The next
This happens because the cluster is obviously terminated, thus it is neither in "running" nor in "waiting" state. I presume that this error is due to the new resource The following workarounds work for me, but as previous stated, I am looking for a better solution. This feature was introduced here and here. I just skim-through the code, but I don't see this behavior being tested (I must say that it was my first time looking at this code). For more information on the issue: |
I think this is a duplicate of #1355 |
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! |
This issue was originally opened by @hdryx as hashicorp/terraform#22116. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
v0.12.3
Terraform Configuration Files
Crash Output
Error: error draining EMR Instance Group (ig-24CP9QNA1THDI): ValidationException: An instance group may only be modified when the cluster is running or waiting.
status code: 400, request id: f6b923cc-a935-11e9-97e8-993b41767f35
Expected Behavior
I expected that the Task Group should be created and added to the EMR
Actual Behavior
EMR is launched but the Task Group is not created (see error above)
The text was updated successfully, but these errors were encountered: