Hi there,
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.
ex:
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?
ex:
aws_instance.fruit[0]
aws_instance.fruit[1]
aws_instance.fruit[2]
can I delete resource for something similar to:
# this doesn't work in terraform
terraform destroy -target aws_instance.fruit[1]
I was going through these links:
Thanks,