This message was deleted.
# getting-started
s
This message was deleted.
c
I read your other thread and it looks like there's an outstanding issue accessing stack config values in a Dynamic Provider. You could use env vars instead. It's not ideal but should work. You could also try adding the secret to stack config still but maybe you could read the config values outside the dynamic provider code and add them to
process.env
yourself? I don't know if that would work though but worth a shot.
r
Thanks! Providing the values through the environment sounds interesting. The env vars can be consumed with
os.environ
when they are defined at the bash level (e.g.
FOO=bar pulumi up
). It’s a little annoying because this way we have to ensure those are available in the environment of whoever is running the pulumi command. The second suggestion, with consuming these from the stack config and then setting them as environment variables, does not work, sadly. I suspect this is due to the actual
__main__.py
code running in a different process than the rest of the program? Whatever the cause, the provider can only see the environment variables it has set up itself.