diff --git a/modules/aws/init.zsh b/modules/aws/init.zsh index 51920ca..7526a09 100644 --- a/modules/aws/init.zsh +++ b/modules/aws/init.zsh @@ -59,6 +59,12 @@ function aws_vpc { --query 'Vpcs[*].{id:VpcId,cidr:CidrBlock,tag:Tags[0].Value}' } +function aws_subnets { + local profile=$(_get_aws_profile) + aws ec2 describe-subnets --profile $profile --output text \ + --query 'Subnets[].[Tags[?Key==`Name`] | [0].Value, SubnetId, VpcId, CidrBlock]' | sort -k1 +} + function aws_ag { local profile=$(_get_aws_profile) aws autoscaling describe-auto-scaling-groups --profile $profile --output ${_aws_output} \