Grep wanted resources:
terraform state list | grep -i <value> > list.txtEdit this list! Make sure you know what you do before running the next command!
# This will remove all resources, line by line, from list.txt
cat list.txt | while read i; do terraform state rm $i; done