https://pulumi.com logo
Title
b

brainy-bear-32920

03/18/2021, 12:06 PM
I like the idea of representing infrastructure as code but am also entertaining the idea if using a tool such as pulumi to automate generating actual code. In one case I am looking into the end result is multiple Vue-based apps where I would like to configure the different routes in for example pulumi and then have pulumi generate the actual Vue code. Is this osmething that someone her has explored? Does it feel completely wrong for pulumi?
b

bored-oyster-3147

03/18/2021, 2:07 PM
I don't think this is the right use case for pulumi because the lifecycle or generation process of code will differ greatly from the process of provisioning cloud resources. Meaning conceptually
Create
might make sense but
Destroy
or
Replace
or things like that don't really make sense, so it would be a difficult application of pulumi, like trying to fit a square peg in a round hole, and probably would hamper more than help your code generation process. That said I'm sure there are code gen / templating tools for the NodeJS space that can help you accomplish what you want to do
b

brainy-bear-32920

03/18/2021, 4:35 PM
Thank you for taking the time to reply. You have a good point and I will see if I can find a more suitable engine for the code generating.