Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save mindw/4350343054edf3ab373a1f3073758b44 to your computer and use it in GitHub Desktop.

Select an option

Save mindw/4350343054edf3ab373a1f3073758b44 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