mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 16:18:00 +00:00
[aws] Improve filtering at aws_ssm_session_any()
This commit is contained in:
parent
048d5302d6
commit
b9c34d9445
@ -101,7 +101,7 @@ function aws_ssm_session_any {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
id=$(aws ec2 describe-instances --profile $profile --output text \
|
id=$(aws ec2 describe-instances --profile $profile --output text \
|
||||||
--filter "Name=tag-value,Values=$1" "Name=instance-state-name,Values=running" \
|
--filter "Name=tag:Name,Values=$1" "Name=instance-state-name,Values=running" \
|
||||||
--query 'Reservations[0].Instances[0].InstanceId')
|
--query 'Reservations[0].Instances[0].InstanceId')
|
||||||
if [[ $2 == "ssh" ]]; then
|
if [[ $2 == "ssh" ]]; then
|
||||||
AWS_PROFILE=$profile ssh $id
|
AWS_PROFILE=$profile ssh $id
|
||||||
|
Loading…
Reference in New Issue
Block a user