1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 13:58:00 +00:00

[æws] Add aws_subnet function

This commit is contained in:
Daniel Carrillo 2020-02-24 21:11:09 +01:00
parent 272528b439
commit 65e8ba0596

View File

@ -59,6 +59,12 @@ function aws_vpc {
--query 'Vpcs[*].{id:VpcId,cidr:CidrBlock,tag:Tags[0].Value}' --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 { function aws_ag {
local profile=$(_get_aws_profile) local profile=$(_get_aws_profile)
aws autoscaling describe-auto-scaling-groups --profile $profile --output ${_aws_output} \ aws autoscaling describe-auto-scaling-groups --profile $profile --output ${_aws_output} \