adding filter to aws describe-instances command to filter by the vpc-id
parent
4ad918e7c6
commit
68dc4507c2
|
@ -452,7 +452,7 @@ aws ec2 create-tags \
|
||||||
|
|
||||||
```
|
```
|
||||||
aws ec2 describe-instances \
|
aws ec2 describe-instances \
|
||||||
--filters "Name=instance-state-name,Values=running" | \
|
--filters "Name=instance-state-name,Values=running" "Name=vpc-id,Values=${VPC_ID}" | \
|
||||||
jq -j '.Reservations[].Instances[] | .InstanceId, " ", .Placement.AvailabilityZone, " ", .PrivateIpAddress, " ", .PublicIpAddress, "\n"'
|
jq -j '.Reservations[].Instances[] | .InstanceId, " ", .Placement.AvailabilityZone, " ", .PrivateIpAddress, " ", .PublicIpAddress, "\n"'
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue