Best way to get the status of the latest deploymen...
# pulumi-deployments
Best way to get the status of the latest deployment?
Was wondering if get deployment somehow supported it already. Alternatively, list deployments (ideally in descending by date order), get first, then get deployment.
The list deployments approach is not ideal since to get the latest, you’d need to walk all the pages.
There is a
query parameter that looks like it didn't make it into the documentation.
statuses are: • not-started • accepted • running • failed • succeeded You can try
to see all queued/running deployments.
Will take care of that one as well on my next docs update pass
Same deal though, right? i.e., if there are hundreds of successful deployments, to get the latest one requires iterating the full set
Ah, good point. Let me open an issue.
Yeah, that API should return the latest deployment first. Not sure why it returns them in that order... We will add a sort parameter and possibly also a
endpoint for
GET deployment