Created
April 27, 2018 18:52
-
-
Save abihf/e40acd646af9138396cd9e3f81923bbf to your computer and use it in GitHub Desktop.
List Subnet by name
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
| aws ec2 describe-subnets | jq '[ .Subnets[] | {name: (.Tags[] | select(.Key == "Name") | .Value), id: .SubnetId} ] | sort_by(.name) | .[] | (.id + " " + .name)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment