jq достаем ip instances из targetgroup

aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" | jq  ".Reservations[].Instances | select(.[].Tags[].Value | startswith(\"production_apps_11_27\") )  \
| select(.[].Tags[].Key == \"Name\") | {InstanceId: .[].InstanceId, PrivateIpAddress: .[].PrivateIpAddress, State: .[].State, Tags: .[].Tags}| [.]" | jq -r '.[0] | .PrivateIpAddress' | sort -u

 

Без рубрики

Related Articles

0 Comment

Leave a Comment

Ваш адрес email не будет опубликован.