Has anyone had a look on using Pkl-lang (<https:/...
# general
l
Has anyone had a look on using Pkl-lang (https://pkl-lang.org/index.html) in combination with Pulumi?
s
I don't think we have any "official" efforts underway, but if you can use Pkl to compile to YAML then there's a way to use it with Pulumi YAML. I believe we did some write-ups on this approach for CUE a while back.
l
Good point. Thanks!
s
Happy to help!
l
@late-chef-72896 you should have been at CfgMgmtCamp where it was first presented by one of the authors.
l
@limited-rainbow-51650 I would have liked to come but I started a new project and timing was not ideal.
I also wonder if it could compliment the pulumi config file
l
When using it at the Pulumi config level: describing the structure of your config, including any constraints, in Pkl, then codegen in Typescript or Go, would allow to set values in the Pulumi stack config, and use the Pkl generated code to read the struct and verify the values according the constraints.
When using it as a preprocessor and compiling to YAML: you could write everything in Pkl and use the
compiler
option of our YAML support. What would help a lot here but is currently missing: full Pkl libraries with all the resource types matching the schema from the existing Pulumi packages/providers.
l
good pointers as well. I need to experiment 🙂