Skip to content

v1.5.4

Latest
Compare
Choose a tag to compare
@pulumi-bot pulumi-bot released this 13 Nov 19:37
d77b74b
Fix NodeJS metadata type (#159)

All of our languages except NodeJS use
`SchemaPackageWithObjectMetaType`. As a result, Node exposes only input
types for object metadata which makes it awkward to consume downstream.

I'm assuming https://github.com/pulumi/crd2pulumi/pull/143 didn't change
this for backwards-compatibility reasons, or maybe it was overlooked. I
_think_ it is safe to continue generating the `ObjectMeta` type alias
(in case users are importing it) but use the input/output types
(matching the upstream k8s types) on resources.

Edit: 

> // schemaPackageWithObjectMetaType is the Pulumi schema package used to
> // generate code for languages that need an ObjectMeta type (Python, Go, and .NET)

So this seems intentional. For whatever reason, using this with Node has
the effect of generating input/output types matching upstream's types,
which seems desirable.

Fixes https://github.com/pulumi/crd2pulumi/issues/158