Last active
November 21, 2022 23:57
-
-
Save s4parke/3470581d92917ed5d9d7be6982b2d32e to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
az account list | jq -r '.[].id' \ | |
| while read sub; do | |
az account -s $sub; \ | |
az monitor diagnostic-settings subscription list \ | |
| jq -r '.[].name' \ | |
| while read rg; do | |
echo $rg; | |
az network vnet list -g $rg --query '[*].addressSpace.addressPrefixes'; | |
done > "PATH_TO_OUTPUT_DIR/$sub"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment