Guest User

Untitled

a guest
Jan 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## Script will get all AZ info from AWS through awscli
  4. ## Required: awscli and jq
  5.  
  6. AZINFO=$(for i in $(aws ec2 describe-regions | jq .Regions[].RegionName | tr -d '"')
  7. do
  8. aws ec2 describe-availability-zones --region $i | jq .AvailabilityZones[].ZoneName | tr -d '"'
  9. done | sort)
  10.  
  11. echo "" > availability_zone_info.md
  12.  
  13. #This is necessary because of markdown on Github
  14. for i in $AZINFO
  15. do
  16. echo $i " " >> availability_zone_info.md
  17. done
Add Comment
Please, Sign In to add comment