Join Slack
Powered by
This message was deleted.
# automation-api
s
sparse-intern-71089
11/06/2020, 11:36 AM
This message was deleted.
f
faint-table-42725
11/06/2020, 2:15 PM
Is that environment variable set in the shell process that’s running the server? In what you’ve pasted above, it looks like you’re setting it in the shell where you’re running curl.
h
hundreds-receptionist-31352
11/06/2020, 3:26 PM
yes you are right, thanks!!
l
lemon-agent-27707
11/06/2020, 3:48 PM
@hundreds-receptionist-31352
you can also set these environment variables on the workspace. You should be able to do this at the time you create your stack.
https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/x/automation/#LocalWorkspace-envVars
Then every command will have them. But you will have to update all usages of LocalWorkspace.create/select stack, or anywhere that a LocalWorkspace is created. Those methods take an optional third parameter where you can set env vars on init:
https://github.com/pulumi/automation-api-examples/blob/main/nodejs/pulumiOverHttp-ts/index.ts#L73
h
hundreds-receptionist-31352
11/06/2020, 5:45 PM
Thanks Evan, I'll take a look at that too
2
Views
Open in Slack
Previous
Next