flat-engineer-3026001/06/2023, 12:25 PM
, something like this, it won't load the file content, and it's hard to parse the yaml to string and set with pulumi secret. The only worked way is to read it from the local file
pulumi config set --secret kubernetes:kubeconfig --path ~/.kube/config
, but it is not secure to store kubeconfig file in github. How did you do that? Confusing...
pulumi_k8s = kubernetes.Provider("pulumi_k8s", kubeconfig=(lambda path: open(path).read())("kubeconfig"))
dry-keyboard-9479501/06/2023, 12:33 PM
should be set to the path of the config, ie
is setup already, then pulumi will use that https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/#setup
flat-engineer-3026001/06/2023, 12:38 PM
dry-keyboard-9479501/06/2023, 12:47 PM
, looks like you can set a value through stdin. so this might work for you?
cat my/kubeconfig | config set --secret kubernetes:kubeconfig
flat-engineer-3026001/06/2023, 12:54 PM
Configuration values can be accessed when a stack is being deployed and used to configure behavior.
If a value is not present on the command line, pulumi will prompt for the value. Multi-line values
My bad, I'm not go through the instruction carefully. 😂
may be set by piping a file to standard in.