Skip to content

Instantly share code, notes, and snippets.

@michaelact
Last active March 10, 2022 03:38
Show Gist options
  • Save michaelact/fea37a3413e7cf8bd920a823a79c241a to your computer and use it in GitHub Desktop.
Save michaelact/fea37a3413e7cf8bd920a823a79c241a to your computer and use it in GitHub Desktop.
TFLint | Running for Recursive Directory | Support Terragrunt
#!/bin/sh
set -e
find . -type d | grep -v .terraform | tail -n +2 > tfdir.txt
cat tfdir.txt | parallel cp .tflint.hcl {}
cat tfdir.txt | parallel 'cd {} && tflint'
cat tfdir.txt | parallel 'cd {} && tflint --module'
cat tfdir.txt | parallel rm {}/.tflint.hcl
rm tfdir.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment