Yes it possible using the shellscript. At time you can list only one region Resources using AWS CLI.
#!/bin/bash
Profile='Enter_your_profile_name'
while read f1 f2
do
Region=$f1
Region_Name=$f2
echo "$Region - $Region_Name \n" >> vpc-details.csv
aws ec2 describe-vpcs --profile $Profile --region $Region --output text --query 'Vpcs[].[Tags[?Key==`Name`].Value | [0],CidrBlock,VpcId,IsDefault]' --filter Name=isDefault,Values=false >> vpc-details.csv
echo "\n" >> vpc-details.csv
done < region.txt
region.txt
- us-east-2 US-East(Ohio) us-east-1 US-East(N-Virginia)
- us-west-1 US-West(N-California) us-west-2 US-West-(Oregon)
- ap-northeast-1 Asia-Pacific-(Tokyo)
- ap-northeast-2 Asia-Pacific-(Seoul) ap-south-1 Asia-Pacific-(Mumbai)
- ap-southeast-1 Asia-Pacific-(Singapore)
- ap-southeast-2 Asia-Pacific-(Sydney) ca-central-1 Canada-(Central)
- eu-central-1 EU -Frankfurt) eu-west-1 EU-(Ireland)
- eu-west-2 EU-(London) eu-west-3 EU-(Paris)
- sa-east-1 South-America-(São-Paulo)
Sample output
eu-west-1 - EU-(Ireland)
Testining 10.135.0.0/16 vpc-xxxx False
VPC_prod 10.140.0.0/16 vpc-zzzz False
Note: - you will be getting the following output
- Name of the VPC
- CIDR range
- VPC-ID
- Is the VPC is default or not
You have to give your profile variable to make it work... Let me know if you have any query.