https://pulumi.com logo
Title
g

great-evening-28439

03/25/2021, 11:02 PM
Hello all. I’ve gotten myself into a world of hurt and hoping someone here can help me get out of it. I believe the problem started when I ctrl-C-ed a
pulumi up
. However it happened, one of my stacks is just no longer there when I
pulumi stack ls
. My state is stored in an s3 bucket so there are many days worth of backups for this state, but I can’t seem to figure out how to import those json backup files into a new state. So I guess my question how do I use checkpoint files to recreate the stack that was deleted? By “checkpoint” files I mean the ones that start like this…
{
    "version": 3,
    "checkpoint": {
        "stack": "k8s.prod",
        "latest": {
            "manifest": {
                "time": "2021-03-23T20:21:39.663781-04:00",
                "magic": "b440e717c6cef8e29267ff18679a2b8540b8fbf85b537601c23feda7afb386ab",
                "version": "v2.23.1"
            },
This command runs, but ends up not actually importing any resources.
pulumi import --file ./k8s.prod-1616545302453665000.checkpoint.json
o

orange-secretary-87364

03/25/2021, 11:26 PM
I think you should be using
pulumi stack import ...
g

great-evening-28439

03/25/2021, 11:28 PM
This is super confusing, but it looks like the checkpoint file’s format is slightly different from what it needs to be to work with
pulumi stack import
. The Python script in the linked issue worked for me though.
🙌 2
d

damp-school-17708

03/26/2021, 8:52 AM
yeah I was there just yesterday