I’m posting this question to know if I can destroy/remove all the resources created by a module. Here is the catch, I am calling that module on a counter, so multiple resources are created.
module1 = 10 resources
module2 = 10 resources
module3 = 10 resources
Now I want to delete module2, is there a simple way to delete all the 10 resources created under module2?
Another similar question is can we delete/remove resources with counter?
can I delete resource for something similar to:
# this doesn't work in terraform
terraform destroy -target aws_instance.fruit
I was going through these links: