05/11/2022, 6:05 PM
Is there a way to reference other yaml files so I could break up resources into separate yaml files or would I have to go the route of breaking up the stacks and using stack references?


05/11/2022, 7:57 PM
Currently the whole stack has to be in a single yaml file. Feel free to open an issue in and explain your use case. Thank you!
❤️ 1


05/11/2022, 7:57 PM
Great thanks!


05/12/2022, 7:05 AM
You can have a look at combining Pulumi YAML with CUE (there is a video on PulumiTV about it), and author the configurations in CUE and generate the YAML from that. CUE has its own module system.
👍🏼 1
❤️ 1


05/12/2022, 2:14 PM
What is CUE?


05/12/2022, 2:16 PM
It is a language that is a superset of JSON. Supposed to be easier to work with than YAML or JSON. Since Pulumi YAML gets transpiled into JSON you can write it in Cue among other languages. Anyone feel free to chime in and correct any of that if it is wrong, but that is my understanding.


05/12/2022, 6:04 PM


05/17/2022, 3:07 AM
@rough-window-15889 @tall-librarian-49374 I wrote a script using our "compiler" option to combine multiple YAML files. It requires the "yq" command line utility: Once you have that installed, give this repo a whirl: the "dev" stack should at least
pulumi preview
, but I copied it from a sample I'm working on so it may not work as is
Please keep in mind that we really recommend the single file approach, as our error messages are really geared around not using a "compiler" to combine text into one file. We can't report where in those multiple files an error might have come from.


05/17/2022, 4:08 AM
Ah clever. Very cool! Thanks for the reply.


10/14/2022, 3:12 PM
My use case: I'm experimenting. I'm simply using Pulumi because I like that its YAML spec gives me a no-nonsense way to "pick up where I left off yesterday" when using my A Cloud Guru playgrounds (that only last 6 hours) as a place to try things and fail without costing my employer or myself any money. I'm constantly commenting out and un-commenting things as I try to isolate various parts of the stack and learn more about how they "really work" and why things aren't working as expected. It's annoying to scroll up, scroll down, etc. to comment things out. It'd be so much easier in VSCode to have things grouped conceptually in a way that makes sense to me, and then just comment out a single file-reference for a while.