Hey guys - had a quick question. Has there been so...
# general
t
Hey guys - had a quick question. Has there been some prior work around converting an existing pulumi yaml to say, generate python code?
m
t
beautiful - so if you have YAML, you can go to any language
m
From the blog:
Copy code
pulumi convert --language python
"This generates a Python program defining the exact same resources, along with all required dependencies."
Yep
t
so if i have python code, i wouldn't be able to take it to YAML but i could go the other way
which makes sense tbh
m
You may hit little issues -- for example, it may not generate the most perfectly idiomatic Python code, etc. But it should generate a valid program in any supported language.
Correct -- YAML to anything, but not the other way 'round .. yet. 🙂
t
ty so much, @miniature-musician-31262
@miniature-musician-31262 is there some work-in-progress or sentiment/interest towards enabling python/js/etc to YAML?
essentially, something like that would enable going from one language to another (using YAML as the intermediary)
which would be quite cool
m
Definitely yes -- let me see if I can dig up an issue, as I think there may already be one.
t
super helpful
this is perhaps the only related one i can see? https://github.com/pulumi/pulumi/issues/12720
m
Yeah I think you're right; that's all I was able to find also.
Would you be up for filing an issue on pulumi/pulumi for it? If not I'd be happy to.
e
There's a similar issue at https://github.com/pulumi/pulumi/issues/4271. I would say it's incredibly unlikely that we would do a conversion from TS/Python/etc to YAML or anything else. It's likely just far far too difficult in general to be able to parse and convert a general programming language to another one. I've got an idea which might allow us to do the most basic programs (a program that doesn't use an Apply methods), but it's a lot of work for not a very clear benefit.