https://pulumi.com logo
Title
m

mysterious-breakfast-62670

04/18/2023, 3:24 PM
hi All, I would like to build pulumi state file from the pulumi history file. did any one attempted this? if so could you pl. share the steps. I know below are two commands to find out revision and export stack state to json. i) to know history -> pulumi stack history ( supposed to show the revision number but i am not seeing it when i run the cmd ) ii) to export the state -> pulumi stack export --revision <revision_number> > mystate.json how can I find out the revision number from pulumi stack history? Appreciate any help/pointers in this regard. Thankyou.
b

billowy-army-68599

04/18/2023, 3:28 PM
what state backend are you using?
m

mysterious-breakfast-62670

04/18/2023, 3:31 PM
azure storage
not using the managed one.
b

billowy-army-68599

04/18/2023, 3:35 PM
self managed backends don’t keep checkpoint files. If you don’t have blob versioning enabled, the history has gone
m

mysterious-breakfast-62670

04/18/2023, 3:54 PM
Seems blob versioning is enabled, am able to see checkpoint fies. How can i build state from checkpoint file? Any idea?
b

billowy-army-68599

04/18/2023, 4:02 PM
yes, grab checkpoint and
pulumi stack import --file <path>
m

mysterious-breakfast-62670

04/18/2023, 4:05 PM
Ok. great. thank you. Let me try
getting error ->could not deserialize deployment: unexpected end of JSON input