Created
February 14, 2019 23:34
-
-
Save nshenry03/8ed6e799e61022c745082367975186ec to your computer and use it in GitHub Desktop.
Assert that all outputs have resources and all resources have at least one output
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*resource\s*" main.tf \ | |
| awk '{print $2"."$3}' \ | |
| sed -e 's/"//g' \ | |
| sort -u | |
) \ | |
<( | |
ack "^\s*value\s*=" outputs.tf \ | |
| ack -o '[({ ,]\w*\.\w*\.?' \ | |
| sed -e 's/^[{( ,]//' -e 's/\.$//' \ | |
| sort -u | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment