Thread
#yaml
    r

    rough-window-15889

    4 months ago
    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?
    t

    tall-librarian-49374

    4 months ago
    Currently the whole stack has to be in a single yaml file. Feel free to open an issue in https://github.com/pulumi/pulumi-yaml/ and explain your use case. Thank you!
    r

    rough-window-15889

    4 months ago
    Great thanks!
    q

    quaint-hydrogen-7228

    4 months ago
    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.
    e

    early-waiter-40542

    4 months ago
    What is CUE?
    r

    rough-window-15889

    4 months ago
    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.
    l

    limited-rainbow-51650

    4 months ago
    o

    orange-policeman-59119

    4 months ago
    @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: https://github.com/mikefarah/yq Once you have that installed, give this repo a whirl: https://github.com/aaronfriel/pulumi-yaml-multi-file 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.
    r

    rough-window-15889

    4 months ago
    Ah clever. Very cool! Thanks for the reply.