Skip to content

(aws-eks): NodeGroups are not accepting CfnParameters #15485

@hemandee

Description

@hemandee

Desired Size,Max Size and Min Size are not accepting CfnParameters properly, the evaluation leads to incorrect evaluation at synth time.

Error:
Desired capacity -1.888154589708894e+289 can't be greater than max size -1.8881545897088942e+289

Reproduction Steps

// The code that defines your stack goes here
const count = new CfnParameter(this,'count',{
  default: "2",
  type: "Number"
})
const mincount = new CfnParameter(this,'mincount',{
  default: "2",
  type: "Number"
})

const maxcount = new CfnParameter(this,'maxcount',{
  default: "10",
  type: "Number"
})

const eksCluster = new Cluster(this,'ekscluster',{
  version: KubernetesVersion.V1_20
})

const nodegroup = new Nodegroup(this,'eksnodegroup',{
  cluster: eksCluster,
  desiredSize: count.valueAsNumber,
  maxSize: maxcount.valueAsNumber,
  minSize: mincount.valueAsNumber
})

What did you expect to happen?

What actually happened?

Environment

  • **CDK CLI Version : 1.109.0 (build c647e38)
  • Framework Version:
  • Node.js Version: v12.12.0
  • **OS : big Sur
  • Language (Version): Typescript

Other


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions