https://pulumi.com logo
#general
Title
# general
h

helpful-lighter-74534

09/12/2018, 3:33 AM
hey guys, how do you pass environment variables and arguments to the Docker image that Pulumi builds to deploy to Fargate?
w

white-balloon-205

09/12/2018, 3:34 AM
Does that help?
h

helpful-lighter-74534

09/12/2018, 3:34 AM
I think so, let me give it a try! Thanks Luke
Looks like it doesn't pass it to the build step... I'm getting:
Copy code
cloud:service:Service: cup-webapp-node
    info: Sending build context to Docker daemon  6.202MB
    ...
    error An unexpected error occurred: "Failed to replace env in config: ${NPM_TOKEN}".
error: an error occurred while advancing the preview
I'm passing it to `up`:
NPM_TOKEN=$ACCOUNT_TOKEN STAGE=eromero pulumi up
w

white-balloon-205

09/12/2018, 3:43 AM
Ahh - you need build-time arguments? I’m not sure we have an example - but you can use this: https://pulumi.io/reference/pkg/nodejs/@pulumi/cloud/index.html#property-args
h

helpful-lighter-74534

09/12/2018, 3:49 AM
🤞
that did the trick! Thanks Luke!
w

white-balloon-205

09/12/2018, 4:24 AM
Great!