Replies: 2 comments
-
Given that KCL supports compiling down to JSON it should be possible to get basic use of KCL with Pulumi by using the compiler runtime option: https://www.pulumi.com/docs/languages-sdks/yaml/#compiler-support Having full support for published KCL packages with KCL type checking would be more involved, but should be possible for the community to support once #11882 is done. |
Beta Was this translation helpful? Give feedback.
-
Even without a dedicated language plugin for KCL, it should be possible to write a tool which converts schemas of Pulumi packages to KCL schemas so that you get IDE support for available Pulumi packages. Here are the specificiations of a Pulumi schema and you can get schemas of packages using |
Beta Was this translation helpful? Give feedback.
-
Hi, currently Pulumi supports several languages for writing configuration. Would it be possible to add KCL?
KCL is a statically typed language (implemented in Go) that allows defining configuration that follows schemas (types), checks (e.g.
age > 10
), and rules/policies. It currently compiles directly to YAML, so it is possible to use it indirectly with Pulumi today.KCL is a full-fledged language which specifically targets configuration. It has a typechecker, linter, formatter, package manager–a complete toolchain. KCL packages can be uploaded to an OCI registry and common configuration (types) can be extracted out and maintained in a central location. Typechecking is near-instant and the feedback loop is very tight. But by not being a general-purpose language, KCL avoids many pitfalls especially in security.
My question is just if there would be interest from the Pulumi project to support it directly as a language runtime and what that would look like. (We know that it would work, because KCL can express anything YAML can.)
Beta Was this translation helpful? Give feedback.
All reactions