https://pulumi.com logo
Title
c

chilly-plastic-75584

03/28/2022, 7:08 PM
--- Can I pass normal go flags or just ENV vars to pulumi when executing? I want to write a little logic for flipping to a yaml render output, but store state locally as it's just for experimentation. Didn't know if I could add flags/parameters or I should use env variables instead.
b

busy-journalist-6936

03/28/2022, 10:34 PM
basic example:
import {env} from 'process';

const kubeconfig = new k8s.Provider('kubeconfig', {
  context: kubeConfigContext,
  kubeconfig: env.KUBECONFIG,
  suppressHelmHookWarnings: true,
  enableDryRun: true,
});
Where
kubeconfig: env.KUBECONFIG,
is reading the env var KUBECONFIG.
ah, woops, that's typescript, I see now you're on golang. similar principal though
c

chilly-plastic-75584

03/29/2022, 1:32 AM
Thanks! I was asking more about passing in flag/cli args directly instead of using env variables, but I'm guessing that's not possible.