Skip to content

Commit

Permalink
fix never ending deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzon committed Apr 30, 2024
1 parent 5060b04 commit 49c563a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def delete(
VpcEndpointIds=[model["Id"]]
)

if not response["VpcEndpoints"]:
if not response["VpcEndpoints"] or response["VpcEndpoints"][0]["State"] == "deleted":
return ProgressEvent(status=OperationStatus.SUCCESS, resource_model=model)

request.aws_client_factory.ec2.delete_vpc_endpoints(VpcEndpointIds=[model["Id"]])
Expand Down

0 comments on commit 49c563a

Please sign in to comment.