mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 02:34:52 +00:00
fix: fallback for ec2 script and only show running instances
This commit is contained in:
parent
96d410e1b2
commit
99581ae1ea
@ -5,14 +5,15 @@
|
||||
|
||||
# Specify AWS_PROFILE and AWS_REGION before running this script
|
||||
|
||||
aws ec2 describe-instances |
|
||||
aws ec2 describe-instances \
|
||||
--filters "Name=instance-state-name,Values=running" |
|
||||
jq -r \
|
||||
'.Reservations[]
|
||||
| .Instances[]
|
||||
| .InstanceId + " - " +
|
||||
(.PrivateIpAddress // "n/a") + " - " +
|
||||
(.PublicIpAddress // "n/a") + " - " +
|
||||
(.Tags | from_entries | .Name // "n/a")' |
|
||||
(.Tags // [] | from_entries | .Name // "n/a")' |
|
||||
fzf \
|
||||
--height 100% \
|
||||
--layout reverse \
|
||||
|
Loading…
Reference in New Issue
Block a user