I think I've found a bug and thought I'd run it pa...
# aws
I think I've found a bug and thought I'd run it past yous here before opening a github: <thread>
So I'm making a managedNodeGroup for EKS. I need to set some things in the a launchTemplate, like the security group etc. The launchTemplate {} requires a version. I tried passing it myLaunchTemplate.latestVersion directly but I got a type error. the latestVersion is a number and version: wants a string. I've resorted to
const mgVersion: pulumi.Input<string> = mgLaunchTemplate.latestVersion.apply(v => v.toString());
but that's horrible. Should I raise a bug?
This isn't really a bug. The latest version of a launch template is always an integer. But if you are creating an asg/ec2/etc you are allowed to input the string "$Latest" for the launch template version and AWS will know to use the highest integer version. That's why there seems to be a type mismatch here
er... ok, thanks.
but i suppose you could create an enhancement ticket to allow both numbers and string for a launch template version input
I seem to recall reading somewhere today that using $Latest creates an issue whereby the nodepool is always updated as pulumi assumes there is drift as it can't tell if there has been so the nodepool is recreated regardless of if it needs to be. This seems like undesirable behavior to me, and makes me wonder why it's better to have it typed as a string when the sane usages is to pass it an int. It's late on a Friday and my brain is fried. I'll consider opening a bug next week.
The necessity for the
type is not because of a decision Pulumi has much control over.
is not a Pulumi invention, it's from AWS's specs