Last active
February 14, 2019 23:06
-
-
Save nshenry03/8d34fb1eedc4a1d3a2e902df21744511 to your computer and use it in GitHub Desktop.
Assert that all variables are used and that all variables are defined.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rupN \ | |
<( | |
ack '^\s*variable\s*"' variables.tf \ | |
| awk '{print $2}' \ | |
| sed -e 's/"//g' \ | |
| sort -u | |
) \ | |
<( | |
ack -o "var\.\w+" main.tf \ | |
| sed -e 's/var\.//' \ | |
| sort -u | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment