https://pulumi.com logo
c

cool-egg-852

10/11/2019, 7:53 PM
Is it on purpose that
ResourceRequirements
has the type as
pulumi.Input<object>
instead of having a named object with
cpu
and
memory
?
w

white-balloon-205

10/11/2019, 8:26 PM
Which
ResourceRequirements
is this? For ECS at least - I don't see
Input<object>
? Is this in Kubernetes? https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/ecs/#ResourceRequirements
b

busy-umbrella-36067

10/11/2019, 8:44 PM
if you check the example on the bottom,
limits
and
requests
can have custom keyvals
c

cool-egg-852

10/11/2019, 8:49 PM
For k8s
And there’s no way to support both with typing?
b

busy-umbrella-36067

10/11/2019, 8:50 PM
There is, but the types are autogenerated from the openapi spec if I recall correctly
so if its getting created as just an object then the openapi spec must define it like that
c

cool-egg-852

10/11/2019, 8:52 PM
Because it’s a bit of a bad experience when working with an IDE. Autocompletion isn’t there because of this.
w

white-balloon-205

10/11/2019, 8:54 PM
Yeah - that makes sense. I've actually noticed this with a few Kubernetes properties. Mind opening an issue? I think it's likely we could improve this at least in TypeScript.
c

cool-egg-852

10/11/2019, 10:09 PM
Sure