pulumi-kotlin icon indicating copy to clipboard operation
pulumi-kotlin copied to clipboard

Required fields for resource

Open myhau opened this issue 2 years ago • 0 comments

Why this works:

https://github.com/VirtuslabRnD/pulumi-kotlin/blob/a74120bcf88f2041c1bef2609b5de71048ab62fe/src/main/kotlin/com/virtuslab/pulumikotlin/codegen/step2intermediate/IntermediateRepresentationGenerator.kt#L70-L77

but this does not:

   val syntheticTypes = listOf(
            createTypes(schema.functions, Usage(Root, Function, Input)) { it.inputs },
            createTypes(schema.functions, Usage(Root, Function, Output)) { it.outputs },
            createTypes(schema.resources, Usage(Root, Resource, Input)) {
                ObjectProperty(
                    properties = it.inputProperties,
                    description = it.description,
                    deprecationMessage = it.deprecationMessage,
                    required = it.required.toSet()
                )
            },
        )

See the related end to end failures here: https://github.com/VirtuslabRnD/pulumi-kotlin/actions/runs/3242055216 (test artifact contains the stacktrace with NPE).

myhau avatar Oct 13 '22 12:10 myhau