https://pulumi.com logo
#general
Title
# general
l

late-chef-72896

02/21/2024, 10:08 AM
Has anyone had a look on using Pkl-lang (https://pkl-lang.org/index.html) in combination with Pulumi?
s

salmon-account-74572

02/21/2024, 3:03 PM
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

late-chef-72896

02/21/2024, 3:32 PM
Good point. Thanks!
s

salmon-account-74572

02/21/2024, 3:35 PM
Happy to help!
l

limited-rainbow-51650

02/22/2024, 9:27 AM
@late-chef-72896 you should have been at CfgMgmtCamp where it was first presented by one of the authors.
l

late-chef-72896

02/22/2024, 9:28 AM
@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

limited-rainbow-51650

02/22/2024, 9:35 AM
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

late-chef-72896

02/22/2024, 9:40 AM
good pointers as well. I need to experiment 🙂
5 Views