Last active
February 22, 2019 18:02
-
-
Save jayers99/f456890c17a318cf390cc7711056d2bf to your computer and use it in GitHub Desktop.
jq terraform state fun
This file contains hidden or 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
cat statefile.tfstate | jq '.. | objects | with_entries(select(.key | contains("aws_network_acl_rule"))) | select(. != {})' | |
# all the acl objects | |
jq '.modules[].resources[].primary | select(.id | startswith("acl-"))' statefile.tfstate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment