Forked from andytumelty/aws query example: show VPC ID, Name and CIDR
Created
May 12, 2021 10:10
-
-
Save mindw/4350343054edf3ab373a1f3073758b44 to your computer and use it in GitHub Desktop.
AWS CLI List VPC ID, Name and CIDR Block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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