Have anyone implemented a rollback logic with Github actions or CircleCI for pulumi. If not, does exporting the stack json before a deploy and checking for any error to import the backup stack and refresh with the exported stack a good approach?
10/14/2021, 7:11 PM
That would rollback the stack, not the provider. So resources that Pulumi created would not be managed by Pulumi. That sounds like a worse situation to me.
I would roll forward only.
You could do it automatically via
, which would put new commits that cause the code to return to its previous shape, then
But I have never found that to be necessary. Generally, if you make a mistake, it gets caught in your first environment, you resolve it in a roll-forward manner, and it never goes any further.
10/14/2021, 11:52 PM
Thats true, I currenlty have three env. Dev, Staging and Prod. I've been doing roll forward.
Thanks for the response. Based on your input, I should stay with the roll forward approach.