Created
September 29, 2017 11:50
-
-
Save mshytikov/2327e4e0b299585d47b8b3f48adb3215 to your computer and use it in GitHub Desktop.
Grep firewall rules to find an IP in all GCP projects
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
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