pulumi / pulumi-eks

A Pulumi component for easily creating and managing an Amazon EKS Cluster
https://www.pulumi.com/registry/packages/eks/
Apache License 2.0
171 stars 80 forks source link

Unable to specify `nodeRootVolumeIops` and `nodeRootVolumeThroughput` in node group resources #1172

Closed rquitales closed 3 months ago

rquitales commented 4 months ago

What happened?

When specifying these numeric inputs, a validation error occurs stating that the inputs are not numeric, despite them being numeric.

It appears that our regex check is wrong here: https://github.com/pulumi/pulumi-eks/blob/161e7af6803b58fea43ffdc3c6f9ee85cf658134/nodejs/eks/nodegroup.ts#L758

It should be ^\\d+$.

Example

const cluster = new eks.Cluster(`${projectName}`, {
    vpcId: vpc.vpcId,
    publicSubnetIds: vpc.publicSubnetIds,
    nodeGroupOptions: {
        desiredCapacity: 1,
        minSize: 1,
        maxSize: 1,
        nodeRootVolumeThroughput: 125,
        nodeRootVolumeType: "gp3",
        enableDetailedMonitoring: false,
    }
})

Stderr:

  pulumi:pulumi:Stack (example-cluster-dev):
    warning: using pulumi-resource-eks from $PATH at /Users/rquitales/code/providers/pulumi-eks/bin/pulumi-resource-eks
    error: Running program '/Users/rquitales/code/providers/pulumi-eks/examples/cluster/' failed with an unhandled exception:
    Error: Cannot create a cluster node root volume of gp3 type without provisioned throughput (nodeRootVolumeThroughput) as integer value.
        at /Users/rquitales/code/providers/pulumi-eks/nodejs/eks/nodegroup.ts:789:27
        at /Users/rquitales/code/providers/pulumi-eks/nodejs/eks/node_modules/@pulumi/output.ts:398:31
        at Generator.next (<anonymous>)
        at /Users/rquitales/code/providers/pulumi-eks/nodejs/eks/node_modules/@pulumi/pulumi/output.js:21:71
        at new Promise (<anonymous>)
        at __awaiter (/Users/rquitales/code/providers/pulumi-eks/nodejs/eks/node_modules/@pulumi/pulumi/output.js:17:12)
        at applyHelperAsync (/Users/rquitales/code/providers/pulumi-eks/nodejs/eks/node_modules/@pulumi/pulumi/output.js:239:12)
        at /Users/rquitales/code/providers/pulumi-eks/nodejs/eks/node_modules/@pulumi/output.ts:310:13

Output of pulumi about

-

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).