https://pulumi.com logo
Title
h

helpful-bear-175

10/12/2019, 4:15 PM
What is the best way to pull in environment variables from the CD process into pulumi? I need to pass aws credentials to a chart for KMS and don’t want to add keys anywhere except for example circleci.
w

white-balloon-205

10/12/2019, 4:20 PM
Not sure I understand exactly - you can read environment variables from within your Pulumi program. You can then wrap those in
pulumi.secret
and pass into resources you create to ensure it is encrypted in the pulumi state.
h

helpful-bear-175

10/12/2019, 4:37 PM
Variables I’m trying to reach are not in the pulumi.stack.yaml.
Maybe the wrong approach.
I want to grab the aws credentials from circleci env during a deploy and use those.
w

white-balloon-205

10/12/2019, 5:31 PM
Can you just do
process.env[“AWS_ACCESS_KEY”]
?
h

helpful-bear-175

10/12/2019, 5:46 PM
I have a look at it again. I got an error it was not callable.