https://pulumi.com logo
#contribute
Title
# contribute
m

magnificent-airport-52631

06/22/2020, 8:06 AM
Can anyone help in this thread: https://github.com/pulumi/pulumi-aws/issues/1012 I am facing a problem on WSL2 to import stack, all I got is this message from command `pulumi stack import`:
error: could not import deployment: performing HTTP request: Post "https://api.pulumi.com/api/stacks///dev/import": stream error: stream ID 3; PROTOCOL_ERROR
Running on: • Pulumi v2.4.0 • WSL2 Ubuntu • OS Build 19042.330 • Windows Feature Experience Pack 120.2202.130.0
Copy code
> wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
Have tried both following methods:
Copy code
$ pulumi stack export | pulumi stack import

$ pulumi stack export --file o.txt
$ pulumi stack import --file o.txt
c

colossal-room-15708

06/22/2020, 8:36 AM
Best to ask this in #general , but I'll give it a shot in my environment.
👍 1
c

colossal-beach-47527

06/22/2020, 7:22 PM
From that error message, the URL looks rather odd, the “…stacks///dev…” especially seems strange. What version of
pulumi
are you using? (Output of
pulumi version
) As far as the syntax for importing a stack,
--file o.txt
should work if the
--help
says that is supported. I usually just run:
Copy code
pulumi stack export > checkpoint.json

# hack

pulumi stack import < checkpoint.json
So that should work, let me know if you still have any issues and I can help troubleshoot.
❤️ 1
m

magnificent-airport-52631

06/23/2020, 7:02 PM
Good observation, I removed the project namespace to post here, that's why the odd "…stacks///dev…" :x Pulumi version output:
Copy code
$ pulumi version
v2.4.0
I could make it done using
Windows Powershell
instead of running Pulumi on
wsl2 Ubuntu
console. The problem on
wsl2
still occurring.
Now using
PowerShell
the problem occurs too:
Copy code
> pulumi stack export | pulumi stack import
warning: removing pending operation 'updating' on 'urn:pulumi:dev::project::aws:cloudfront/distribution:Distribution::cdn' from snapshot
error: could not import deployment: performing HTTP request: Post "<https://api.pulumi.com/api/stacks/namespace/project/dev/import>": read tcp 192.168.15.4:58422->52.38.45.108:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Have tried to logout and login again but did not worked.
c

colossal-beach-47527

06/25/2020, 8:30 PM
Sorry for missing this, but let me see if I understand it correctly: You aren’t able to run
pulumi stack import
when running Windows PowerShell (
ps.exe
?) when on
wsl2 Ubuntu
, right? That error message makes it look like there is a networking problem contacting https://api.pulumi.com, but if you can successfully do so in some other environment/VM on your machine… then the best guess I have is that it could be related to the certificates available and/or if HTTP proxying is setup or something. As a brief sanity check, you could run
curl
to make sure you can contact the service:
Copy code
% curl <https://api.pulumi.com/api/user>
{"code":401,"message":"Unauthorized: No credentials provided or are invalid."}
If this persists, please do file an issue on github.com/pulumi/pulumi and we can take a closer look. This does seem odd.