Skip to content

Instantly share code, notes, and snippets.

@steve-jansen
Created November 18, 2016 20:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steve-jansen/20d15d2389fec77053d24c54642b545c to your computer and use it in GitHub Desktop.
Save steve-jansen/20d15d2389fec77053d24c54642b545c to your computer and use it in GitHub Desktop.
Parse Terraform state file for AWS security group rules
jq '.modules[].resources | to_entries[] | select(.value.type == "aws_security_group_rule" or .value.type == "aws_security_group")' test.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment