Skip to content

Instantly share code, notes, and snippets.

@justinclayton
justinclayton / taint_module.sh
Created January 19, 2016 18:48
Terraform: taint all resources from one module
#!/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