Is there any way to export previous version of stack?
There are pulumi stack export
command and I can export current state of stack
to the file, but seems CLI not accept version or any flag to specify previous stack.
Should I re-import all resource into pulumi or recreate them....?
You can use the --version
flag of pulumi stack export
to get the previous version of a stack's checkpoint. (Note that this only applies to stacks hosted on https://app.pulumi.com, and not using the "local" or "file state" backends.)
For example, if the current stack version is 100 (from the Pulumi Console), you can get the previous checkpoint state by running:
pulumi stack export --version 99