fix(ec2): handle non-existing private ip (#3906)

This commit is contained in:
Sergio Garcia
2024-05-03 09:12:14 +02:00
committed by GitHub
parent 8b0bae1c57
commit c67c23dd42
@@ -261,7 +261,7 @@ class EC2(AWSService):
id=interface["NetworkInterfaceId"],
association=interface.get("Association", {}),
attachment=interface.get("Attachment", {}),
private_ip=interface["PrivateIpAddress"],
private_ip=interface.get("PrivateIpAddress"),
type=interface["InterfaceType"],
subnet_id=interface["SubnetId"],
vpc_id=interface["VpcId"],
@@ -524,7 +524,7 @@ class NetworkInterface(BaseModel):
id: str
association: dict
attachment: dict
private_ip: str
private_ip: Optional[str]
type: str
subnet_id: str
vpc_id: str