https://pulumi.com logo
#automation-api
Title
# automation-api
m

most-lighter-95902

03/06/2022, 4:36 AM
Copy code
const stack = await LocalWorkspace.selectStack({
  stackName: `${organization}/${stackName}`,
  projectName: project,
  program: async () => { }, // don't need a program just to get outputs
})

await stack.setAllConfig({ 'PULUMI_ACCESS_TOKEN': 'xxx' })

const outputsRes = await stack.outputs()
l

little-cartoon-10569

03/06/2022, 8:14 PM
PULUMI_ACCESS_TOKEN is an environment variable, not a conflg value.
1
m

most-lighter-95902

03/10/2022, 3:46 AM
Hi @little-cartoon-10569 - thanks for the response. Is it secure to set PULUMI_ACCESS_TOKEN as an environment variable in a container?
l

little-cartoon-10569

03/10/2022, 4:09 AM
I believe so. This approach is used with many tools as a secure way to avoid putting secret values on the command line. The environment of one shell / process is well-protected from other processes.
This approach pre-dates Pulumi by many years...
m

most-lighter-95902

03/10/2022, 4:58 PM
Got it thank you!
2 Views