Skip to content

Types for apiVersion, kind, metadata, status should not also accept undefined #34

@metral

Description

@metral

Expected behavior

Typedefs for k8s should not also accept ... | undefined

Current behavior

Currently the generated code produces the following incorrect typedefs:

public readonly apiVersion!: pulumi.Output<"foo/v1" | undefined>;
public readonly kind!: pulumi.Output<"Foo" | undefined>;
public readonly metadata!: pulumi.Output<ObjectMeta | undefined>;
public readonly status!: pulumi.Output<outputs.foo.bar | undefined>;

These need to be corrected to:

public readonly apiVersion!: pulumi.Output<"foo/v1">;
public readonly kind!: pulumi.Output<"Foo">;
public readonly metadata!: pulumi.Output<ObjectMeta>;
public readonly status!: pulumi.Output<outputs.foo.bar>;

See example of a k8s Deployment in pulumi-kubernetes that follows suit with the proposed corrections.


Related:

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions