<@UB3BGTV63> In <https://github.com/pulumi/pulumi-...
# general
i
@white-balloon-205 In https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/cluster.ts#L92 - both
instanceRole
and
instanceRoles
are outputs and thus the expression fails even though none of them is set
Seems like it was a problem in my code. Though theoretically it can happen?
w
I think the idea is that the caller should only pass a value at all for one or the other. Technically this doesn't support passing
Output<undefined>
for one and
Output<defined>
for the other, but that ideally shouldn't be a common use case.
Curious if @lemon-spoon-91807 or @breezy-hamburger-69619 have thoughts on this general pattern.
l
Right. only one should be set. Though i am curious why these are outputs. @breezy-hamburger-69619 In general we discourage Output<Resource>. Is that necessary here?
b
Taking a 2nd look @ it, I don’t believe it is necessary. I adopted the
Output<Resource>
for
instanceRoles
as I found
instanceRole
to be an
Output
so i followed suit. This should be type itself, not outputted
w
Input<Resource> is a holdover for an old design pattern here. Hard to change now. But that's a bit orthogonal to the question I was asking (about using
&&
on two "optional Input<T>" arguments). But not a big deal.