Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. aws ec2 describe-regions |
  2. jq -r ".Regions[] | .RegionName" |
  3. ForEach-Object {
  4. $vpcCidrs = @()
  5. } {
  6. aws ec2 describe-vpcs --region=$_ |
  7. jq -r " .Vpcs[] | .CidrBlock" |
  8. ForEach { if ($_ -ne "172.31.0.0/16") { $vpcCidrs += $_ } }
  9. } {
  10. $vpcCidrs
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement