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

cuddly-eye-68174

12/21/2018, 12:29 AM
Guys, My last question was very lame 😉 I should have asked how can I write Pulumi.Output into a file....what is the best practice? 😉 I have to write a yaml...
w

white-balloon-205

12/21/2018, 12:32 AM
In Python? Or JavaScript?
c

cuddly-eye-68174

12/21/2018, 12:47 AM
Hi Luke, in python
Hi Guys, do you have any suggestion how should I write Pulumi.Output into a file(yaml) in Python. Normal write context is not working, because there is no resolved data when I try it. Any help would be appreciated. Thanks, Darvi
self.kubeconfig is a pulumi.Output
and pulumi.export is working on that
w

white-balloon-205

12/21/2018, 5:02 PM
Sorry for delay. Did the code snippet above work? That's what I would have expected. (Though you should not need the
return kubeconfig
as you are just calling this function for it's side-effect).
c

cuddly-eye-68174

12/21/2018, 7:15 PM
yes, nearly work...my college suggest me a solution
He told me I should write and compose the kubeconfig in one run
in this way it is working
as I expect
like tee in linux 🙂
So thanks Luke, I really appreciate for your help too
w

white-balloon-205

12/21/2018, 7:30 PM
Great! Note that we've also just added (will be released soon) the
all
combinator which makes combining multiple inputs together like this easier - see https://github.com/pulumi/pulumi/issues/2284 and https://github.com/pulumi/pulumi/pull/2293.
(this has been available in JavaScript for some time, and is commonly used there, and we've now added to Python as well)
c

cuddly-eye-68174

12/21/2018, 7:32 PM
It's Cool 😉
It will be easier to do this
Luke may I have one more question?
What is the best way to access caller identity in Pulumi like in boto3?
I was not able to implement this without boto3 framework
c

cuddly-eye-68174

12/21/2018, 7:36 PM
I am checking
w

white-balloon-205

12/21/2018, 7:36 PM
API docs for Python coming soon! https://github.com/pulumi/docs/issues/630
💪 1
c

cuddly-eye-68174

12/21/2018, 7:36 PM
bah 🙂
Thnaks! 🙂