Hi - I am trying to move to Pulumi from AWS CDK. ...
# aws
c
Hi - I am trying to move to Pulumi from AWS CDK. I have been trying to automate connecting to S3 Backend from pulumi/pulumi-go docker image. So far wasted 2 full days and unsuccessful. Could not find documentation. Basically, I cannot do a pulumi login to S3 inside pulumi-go docker image - This fails with user not found message. Pls help
m
Can you share some of the text of the message you’re seeing? Is it from S3, Pulumi, something else? I’ll see if I can repro in the meantime.
c
Hi @miniature-musician-31262 - thanks for your response. linux user is missing in pulumi-go docker image and also this is deployed on EKS, Error is from Pulumi, Could not get luser
trying out with linux user now
m
Ok. Just to confirm, are you using https://hub.docker.com/r/pulumi/pulumi?
c
pulumi/pulumi-go docker image
m
Hm, so S3 login seems to work for me locally with pulumi/pulumi-go when I'm logged in as
root
(in the container) -- this is on a newly downloaded image and new container under Docker for Mac:
Copy code
# Pasted from the README:
$ docker run -it \
    -e PULUMI_ACCESS_TOKEN \
    -e AWS_ACCESS_KEY_ID \
    -e AWS_SECRET_ACCESS_KEY \
    -e AWS_REGION \
    -w /app \
    -v $(pwd):/app \
    --entrypoint bash \
    pulumi/pulumi-go

root@d961dd418acc:/app# pulumi login <s3://cnunciato-pulumi-s3-login-test>
Logged in to d961dd418acc as root (<s3://cnunciato-pulumi-s3-login-test>)

root@d961dd418acc:/app/aws-go# pulumi new aws-go
This command will walk you through creating a new Pulumi project.

Enter a value or leave blank to accept the (default), and press <ENTER>.
Press ^C at any time to quit.

project name (aws-go):
project description (A minimal AWS Go Pulumi program):
Created project 'aws-go'
What's different for you?
c
I do not have PULUMI_ACCESS_TOKEN
as I am using S3 backend
m
Ah, let me see if it's different without that (I just happened to have one on my env)
c
ok
m
So unsetting
PULUMI_ACCESS_TOKEN
and starting a new container, it still works. Lemme try not even passing in that variable with
-e
.
c
ok
what other env vars do you have in your container?
m
Yeah that still works, too:
Copy code
$ docker run -it \
    -w /app \
    -v $(pwd):/app \
    --entrypoint bash \
    pulumi/pulumi-go

root@my-container:/app# pulumi login <s3://cnunciato-pulumi-s3-login-test>
Logged in to ny-container as root (<s3://cnunciato-pulumi-s3-login-test>)

root@my-container:/app# env
HOSTNAME=my-container
AWS_REGION=us-west-2
PWD=/app
HOME=/root
AWS_PAGER=
AWS_SECRET_ACCESS_KEY=[redacted]
TERM=xterm
SHLVL=1
AWS_ACCESS_KEY_ID=[redacted]
PATH=/pulumi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
AWS_SESSION_TOKEN=[redacted]
CGO_ENABLED=0
GOPATH=/go
_=/usr/bin/env
I only have Docker for Mac to test with at the moment, but yeah, seems to be working with that as expected.
c
how do you have a root user, offcial pulumi/pulumi-go image has no linux user
I am using official image
m
Who are you logged in as if not root? How are you logging into the container?
c
“i-have-no-name” i think
m
Oh, so are you getting a message like this?
Copy code
$ docker run -it --user nope [...]

docker: Error response from daemon: unable to find user nope: no matching entries in passwd file.
ERRO[0000] error waiting for container:
c
i created a nonroot docker user and gave permission to pulumi/projects folder and set up HOME and PASSPHRASE variables,
this seem to work
m
Ah great, ok. So you're unblocked then?
c
yes
m
Awesome!
c
thank you for your support on the weekend
m
Best of luck! Absolutely, feel free to reach out as you need.
c
👍