mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(ec2): skip terminated instances in DescribeNetworkInterfaces (#1074)
This commit is contained in:
1 parent
34d739edf8
commit
9b436e6c67
1 file changed
+5
@@ -1558,6 +1558,11 @@ public class Ec2Service {
|
||||
Set<String> foundIds = new HashSet<>();
|
||||
for (Instance inst : instances.values()) {
|
||||
if (!inst.getRegion().equals(region)) continue;
|
||||
if (inst.getState() != null
|
||||
&& inst.getState().getName() != null
|
||||
&& "terminated".equals(inst.getState().getName())) {
|
||||
continue;
|
||||
}
|
||||
for (InstanceNetworkInterface eni : inst.getNetworkInterfaces()) {
|
||||
if (!networkInterfaceIds.isEmpty()
|
||||
&& !networkInterfaceIds.contains(eni.getNetworkInterfaceId())) {
|
||||
|
||||
Reference in new issue
Block a user