-
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
Error reading JobQueue: "%!s(<nil>)" #6071
Comments
I'm really not a go expert but I'd be happy to work on the issue. Let me know if there are contribution guidelines or anything else I should know before submitting a pull request. |
Hi @euclideansphere 👋 Thanks for the report and sorry you're running into trouble here. You can find our contribution documentation here: https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md Very briefly looking at this code: It looks like the batch service doesn't return a proper error (like other AWS services) when the queue does not exist, so we should remove the if jq == nil {
log.Printf("[WARN] Batch Job Queue (%s) not found, removing from state", d.Get("name").(string))
d.SetId("")
return nil
} This will prompt Terraform to show the resource as needing recreation, instead of returning the error. It can be acceptance tested by adding something similar to this pull request: #5967 Hope this helps! |
Thanks for the help @bflad, hopefully I'll have some time this weekend to dig into that this weekend. I'll ping if I have any more questions. |
The fix for this has been merged into master and will release with version 1.40.0 of the AWS provider, likely middle of this week. 👍 |
This has been released in version 1.40.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
I can't share the full log due to NDA/secrecy rules at the company I work for. Here are the relevant sections of logs I could find.
Expected Behavior
Terraform state should already know this has been removed in a previous execution of
terraform destroy
, or it should not have been removed in a previous execution. subsequent destroys on following failed destroys should not risk an out of date state.Actual Behavior
The job queue was destroyed without terraform state being properly updated. In addition to this, the error message should be far more intuitive than "error reading job queue %!s(<nil)".
Steps to Reproduce
terraform destroy
terraform destroy
againThe text was updated successfully, but these errors were encountered: