https://pulumi.com logo
#general
Title
# general
h

high-morning-17948

10/14/2021, 6:58 PM
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?
l

little-cartoon-10569

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.
👍 2
You could do it automatically via
git revert
, which would put new commits that cause the code to return to its previous shape, then
up
that.
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.
h

high-morning-17948

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.
@little-cartoon-10569 Thanks!
16 Views