Hey, I'm using an eks/nodegroup with a custom ami ...
# aws
g
Hey, I'm using an eks/nodegroup with a custom ami and the initial provisioning works fine but if I update the
image_id
in the launch template i got the following aws error:
error: operation UPDATE failed with "InvalidRequest": You cannot specify the field releaseVersion when using custom AMIs. (Service: Eks, Status Code: 400, Request ID
i'm obviously not setting the releaseVersion, hence my confusion im using python and aws native
RTFM 🙂 that's one of the limitation, you've got to recreate the nodegroup the above is only true when switching from custom to not custom ami
i m basically only switching my nodegroup from one launch template id to another and that fails, doing the same with the cli :
aws eks update-nodegroup-version  --cluster-name ${CLUSTER} --nodegroup-name ${NODEGROUP_NAME} --launch-template name=${LT_NAME},version=${LT_VERSION}
so that starts to feel like a bug in the provider that's reusing the previous ouput of release version as an input even though in this case it should not
feels like a edge case because the resource is not aware of the content of the launch template, probably why this fails
pretty sure that's what happens, checking the state i see :
Copy code
"outputs": {
    "__inputs": {
        "...": "...",
        "ciphertext": ....
    },
    "amiType": "CUSTOM",
    "arn": "....",
    "capacityType": "ON_DEMAND",
    "clusterName": "...",
    "id": "...",
    "instanceTypes": [],
    "labels": {
        "<http://node.kubernetes.io/role|node.kubernetes.io/role>": "workers"
    },
    "launchTemplate": {
        "id": "lt-03724fe1f358b6d39",
        "name": "node-template",
        "version": "1"
    },
    "nodeRole": "blahblah",
    "nodegroupName": "blahblah",
    "releaseVersion": "ami-05a6b4bea29fc7541",
so the
releaseVersion
got resolved to. the amiId (it does the same in the aws console)
only workaround i found was to perform a replacement when the lauchTemplate changes but it's not exactly cool if someone has any pointers to the code that handles that, not super familiar with the pulumi internals but got me curious 😊