https://pulumi.com logo
#general
Title
# general
m

many-psychiatrist-74327

05/11/2021, 5:39 PM
👋 hello! qq: what’s the recommended approach of reading a secret from another project? context: my project
infra
exports a
kubeconfig
for a kubernetes cluster (and it’s a secret), and my project
services
reads it, creates a
k8s.Provider
and uses that to provision my services in the cluster. I cannot use
StackReference.getOutputValue()
because the output is a secret. If I use
StackReference.getOutput()
, then I have to do
Output.apply()
to transform it into a
Output<k8s.Provider>
. But the k8s resources only takes `k8s.Provider`s, not `Output<k8s.Provider>`s… so.. I guess one option is to put everything inside the
apply()
call.. but that’s undesirable. I’m wondering if there’s a cleaner way
p

prehistoric-coat-10166

05/11/2021, 5:49 PM
You should be able to give the resulting output of
getOutput
as a parameter to the k8s.providers'
kubeconfig
👀 1
m

many-psychiatrist-74327

05/11/2021, 6:47 PM
thanks! 🙏 that works for me 👍