sparse-intern-71089
06/01/2022, 11:59 PMprehistoric-london-9917
06/02/2022, 12:01 AMprehistoric-london-9917
06/02/2022, 4:44 AMLocalWorkspaceOptions
interface like:
const opts: LocalWorkspaceOptions = {
secretsProvider: secretsProvider,
envVars: {
AWS_ACCESS_KEY_ID: credentials.Credentials!.AccessKeyId!,
AWS_SECRET_ACCESS_KEY: credentials.Credentials!.SecretAccessKey!,
AWS_SESSION_TOKEN: credentials.Credentials!.SessionToken!,
},
where credentials
is the output of an STS AssumeRoleCommand
action.
According to the docs, those environment variables should be passed to “every Pulumi command”.
However, when the automation runs:
const stack = await LocalWorkspace.createOrSelectStack(args, opts);
I get an access denied error on the bucket, which makes me think createOrSelectStack
is not using the environment variables as expected (though I’m not sure how to prove this).
If I set the process’ environment like I was originally (e.g. process.env.AWS_ACCESS_KEY_ID = xxx
) immediately before the createOrSelectStack
, it works as expected.
Any thoughts on how I can get createOrSelectStack
to honour the envVars
set in the opts
object?bored-oyster-3147
06/30/2022, 4:03 PMopts
. If that is not happening as expected than I would open an issue on github for it, as that is how it is supposed to function.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by