Taint all resources from one module
Terraform: taint all resources from one module
If you want to taint all resources from one module, here is a simple way to do it.
``` #!/bin/bash
module=$1
for resource in terraform show -module-depth=1 | grep module.${module} | tr -d ':' | sed -e 's/module.${module}.//'
; do
terraform taint -module ${module} ${resource}
done