https://pulumi.com logo
Title
p

purple-lawyer-35555

06/22/2021, 12:49 PM
Hi all! I'm using the automation api and I was wondering if it's possible to cancel the deployment and automatically rollback to last deployed stack. What's the best way to achieve this with this api?
b

billowy-army-68599

06/22/2021, 1:44 PM
Pulumi drives towards a desired state, so there's no automatic rollback per-se. can you elaborate a little more on what you're trying to achieve?
p

purple-lawyer-35555

06/22/2021, 3:46 PM
another important thing is that I'm using my a local backend (pulumi login --local). So, let's say that I have a program deploying A, B and C. If the program succeeds deploying A but for some reason it fails when running B, my deployed stack will be in an inconsistent state, so at this point I would like to be able to rollback to last successfully deployed stack, leaving the deployed solution in a consistent state
b

billowy-army-68599

06/22/2021, 3:49 PM
Pulumi drives towards the state of your code is how pulumi works, when you say "roll back to last successfully deployed stack" - what do you mean? you'd have to set your code to the state it would be in