We can't process TERMINATED, since they point to VNICs that don't exist. We either have to skip, or return but skip the IP for hostname. Not sure why we would want the later?
Quick fix is to skip by adding this at line 40:
if instance.lifecycle_state == 'TERMINATED':
continue
We can't process TERMINATED, since they point to VNICs that don't exist. We either have to skip, or return but skip the IP for hostname. Not sure why we would want the later?
Quick fix is to skip by adding this at line 40: