https://stackoverflow.com/questions/56542928/how-to-delete-the-ami-and-snapshot-simultaneously-during-terraform-destroy
I have posted this issue in terraform aws provider Github. But no response from them.