Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sagarrakshe/17b8c5e5c868fefe656838c322083336 to your computer and use it in GitHub Desktop.
Save sagarrakshe/17b8c5e5c868fefe656838c322083336 to your computer and use it in GitHub Desktop.
AWS CLI List VPC ID, Name and CIDR Block
# display VPC ID, CIDR Block and Name
aws ec2 --output text --query 'Vpcs[*].{VpcId:VpcId,Name:Tags[?Key==`Name`].Value|[0],CidrBlock:CidrBlock}' describe-vpcs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment