https://pulumi.com logo
#yaml
Title
# yaml
r

refined-pilot-45584

10/25/2022, 4:27 PM
Hey All; I am going to ask an massively Rookie question here. Then when I get an answer that makes me feel like a fool I’ll show myself the door; With a YAML resource implementation. Can I implement complex structures in Pulumi; Specifically; can I make a “loop” over an Array for example? Create 4 of the same resource, based on 4 items in an array? I’m addition, can a template accept type array as input from the CLI Pulumi new prompt?
b

billowy-army-68599

10/25/2022, 4:32 PM
With a YAML resource implementation. Can I implement complex structures in Pulumi;
Do you have an example?
Specifically; can I make a “loop” over an Array for example? Create 4 of the same resource, based on 4 items in an array?
No. You could use a templating engine or something like cue to do this, but we recommend converting to a fully fledged programming language if you need this
I’m addition, can a template accept type array as input from the CLI Pulumi new prompt?
Not sure what this means?
r

refined-pilot-45584

10/25/2022, 4:36 PM
Cheers for such a swift response. In fairness I expected the answers you provided as they are unusual and basically wrong use of yaml. The reasoning behind the questions is to explore how rapidly we can scale our development, support of multiple languages “fully fledged” by way of the Pulumi convert toolkit. Developing in Yaml first for conversion to Go, Python TS after; is our initial goal; but we want to work out the early limitations in this approach.
b

billowy-army-68599

10/25/2022, 4:40 PM
is the desire to support multiple languages internally? or you specifically want to start out with YAML because it’s an easier authoring model?
r

refined-pilot-45584

10/25/2022, 4:41 PM
Externally support actually; If it wasn’t for the scale and maintainability of multiple languages then I would be all in on go haha!
b

billowy-army-68599

10/25/2022, 4:43 PM
are you aware of Pulumi’s multi language package capabilities? You can write your abstraction/components in one language, then consume them in all Pulumi’s supported languages, including YAML
so you don’t need to convert anything
l

limited-rainbow-51650

10/25/2022, 5:09 PM
I’m going to show all about this next week during our Cloud Engineer Days! https://www.pulumi.com/resources/simpler-pulumi-package-authoring/
r

refined-pilot-45584

10/25/2022, 5:24 PM
Yeah; sweet got that covered and I’ll attempt to attend that session also!
f

flaky-arm-38472

11/09/2022, 3:24 PM
Hi @limited-rainbow-51650, do you know when the recording of your session will be available?.
l

limited-rainbow-51650

11/09/2022, 3:26 PM
@flaky-arm-38472 we should have the recordings shortly. Let me check with our organizing team.
And here is the recording:

https://www.youtube.com/watch?v=X-vZZybUdxc

f

flaky-arm-38472

11/09/2022, 3:40 PM
Cool, thanks. Was waiting for it.
3 Views