What is the best way to pull in environment variab...
# typescript
h
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
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
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
Can you just do
process.env[“AWS_ACCESS_KEY”]
?
h
I have a look at it again. I got an error it was not callable.