https://pulumi.com logo
#typescript
Title
# typescript
a

ancient-megabyte-79588

03/04/2021, 4:23 PM
Good day everyone... does anyone know if there is a way for the
pulumi cli
to proceess a
.env
file? I want to simulate what our deployment pipelines do by passing in secrets as Env Var and I don't want to make a bunch of actual Env Var in my shell session.
b

billowy-army-68599

03/04/2021, 4:28 PM
is there any reason you can't just load the file from your code?
Copy code
npm install dotenv
import * as dotenv from 'dotenv';
dotenv.config();
etc?
a

ancient-megabyte-79588

03/04/2021, 4:36 PM
That totally worked. Thank you. I guess I was hoping that the
pulumi cli
would do that itself.
b

billowy-army-68599

03/04/2021, 4:43 PM
the pulumi CLI is just interpreting the code and passing it to the the language interpreter, so anything you put i the code is being handled by the CLI 🙂
👍 1