Hello everyone! I’m curious if there’s any intenti...
# java
a
Hello everyone! I’m curious if there’s any intention of moving forward with Kotlin support or not, besides what VirtusLab published.
s
No plans at present to add additional language support. The reason is that for each new language we add, there's an ever-decreasing amount of growth in the use of the product, but the maintenance burden gets larger because of the increased surface area we need to test. I'm not super knowledgeable on the JVM. Can you consume the (Pulumi or otherwise) Java libraries in any JVM language, or are there additional bindings that have to be written or maybe some particular interface a JAR would need to conform to?
🙏 1
b
As far as I know about the Pulumi Kotlin project, it uses the Java language SDK for pulumi, but adds a kotlin wrapper that provides a nicer DSL than the Java builder pattern pulumi uses.
👍 1
s
@better-kitchen-49894 I assume Kotlin has syntax that makes initializing objects nicer, similar to what's available in TypeScript or C#?
b
import com.pulumi.kotlin.Pulumi import com.pulumi.kubernetes.apps.v1.kotlin.deployment fun main() { Pulumi.run { ctx -> val deployment = deployment("nginx") { args { spec { selector { matchLabels("app" to "nginx") } replicas(1) template { metadata { labels("app" to "nginx") } spec { containers { name("nginx") image("nginx") ports { containerPort(80) } } } } } } } val name = deployment.metadata?.applyValue { it.name.orEmpty() } ctx.export("name", name) } }
👍 2