Skip to content

Instantly share code, notes, and snippets.

@mshytikov
Created September 29, 2017 11:50
Show Gist options
  • Save mshytikov/2327e4e0b299585d47b8b3f48adb3215 to your computer and use it in GitHub Desktop.
Save mshytikov/2327e4e0b299585d47b8b3f48adb3215 to your computer and use it in GitHub Desktop.
Grep firewall rules to find an IP in all GCP projects
gcloud projects list --format=json | jq -r .[].projectId |
xargs -I{} bash -c "echo ==== {}======; gcloud compute --project {} firewall-rules list | grep 0.0.0.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment