aws-eks: Nodegroup.nodegroupName is not the nodegroup's name #22442
Labels
@aws-cdk/aws-eks
Related to Amazon Elastic Kubernetes Service
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
The result of
myNodegroup.nodegroupName
is something likemycluster/mynodegroup
. This is not the nodegroup's name.Eg, if I try to pass this to an SDK call to describe the nodegroup, I get:
Expected Behavior
myNodegroup.nodegroupName
to give the name of the nodegroup.Current Behavior
myNodegroup.nodegroupName
is the "physical resource ID", see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#aws-resource-eks-nodegroup-return-values, because it uses.ref
notattrNodegroupName
. See eg https://github.com/aws/aws-cdk/blob/v2.33.0/packages/@aws-cdk/aws-eks/lib/managed-nodegroup.ts#L455Reproduction Steps
Roughly, something like:
Then call
aws eks describe-nodegroup --cluster-name mycluster --nodegroup-name [value from output]
and see that it errors.Possible Solution
Change
.nodegroupName
to be.attrNodegroupName
.Maybe add
.nodegroupPhysicalResourceId
as.ref
?Additional Information/Context
This would be a breaking change.
CDK CLI Version
2.33.0
Framework Version
No response
Node.js Version
16
OS
Linux
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: