Quick question, I’m trying to re-create access to ...
# general
j
Quick question, I’m trying to re-create access to one of my pulumi infra. What I did is I downloaded
state.json
file from S3 bucket and now I’m trying to do something like this:
Copy code
➜  sandbox git:(main) ✗ pulumi stack import --file state.json
error: this command requires a stack, but there are none
➜  sandbox git:(main) ✗ pulumi stack import --stack eba --file state.json
error: no stack named 'eba' found
Am I missing something? I don’t see any other options for
import
argument. And I see
eba
name in the state.json file:
Copy code
➜  sandbox git:(main) ✗
{
    "version": 3,
    "checkpoint": {
        "stack": "eba", (...)
e
stack init
to create a new stack first.
j
Thanks. I still have some issue with the state file:
Copy code
➜  sandbox git:(main) ✗ pulumi stack import --stack eba --file eba.json
error: could not deserialize deployment: unexpected end of JSON input
File looks valid to me (I double checked it with Go).
e
How did you check its valid?
j
I have a tool in Go for checking json.
I think it’s working now. I added local storage for the state file:
Copy code
pulumi login file:///...
and I copied file there (without using import):
Copy code
cp state.json state/.pulumi/stacks/eba.json
and now I see stack and resources.
e
hmm odd that import didn't like it, I thought the format written by filestate would match what import expected
but glad something worked out
j
According to the documentation it should work 😕 So no idea why I run into this. At least the same file works fine when I move it to the new stack directory 🙂