In my case some error happened on other step. I suppose SNS topic already was deleted. And when I rerun destroy again the terraform failed when tried to remove SNS topic second time.
So steps to reproduce
Create SNS topic
Create other resource
Try to destroy cluster, but change it in a way the terraform fail after deleted SNS topic, eg. SNS topic is deleted but fail on other resource.
Fix the problem, try to destroy cluster again to remove resources
At this point terraform will try to delete SNS topic second time and fail. And will not try to delete resource which was created on step (2), because of earlier error.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
v1.7.4
AWS Provider Version
v5.41.0
Affected Resource(s)
Expected Behavior
If SNS topic does not exists, then terraform should just remove resource from the state instead of failing.
Actual Behavior
I can not destroy cluster.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
In my case some error happened on other step. I suppose SNS topic already was deleted. And when I rerun
destroy
again the terraform failed when tried to remove SNS topic second time.So steps to reproduce
Debug Output
Panic Output
No response
Important Factoids
No response
References
https://github.com/hashicorp/terraform/issues/34868
Would you like to implement a fix?
None