Skip to content

Parameter valueAsNumber not returning correct number. #3448

@amwill04

Description

@amwill04

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • [X ] 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce

Create a CfnParameter with type 'Number' and a default value.
Use that value somewhere with parameter.valueAsNumber
Produces a value of -1.8881545897087546e+289

cosnt param = new CfnParameter(this, 'RedendtionPeriod', {
            description: 'SQS redention period in seconds 60 - 1209600 [14400]',
            type: 'Number',
            default: 14400,
            minValue: 60,
            maxValue: 1209600,
            constraintDescription: 'Must be between 60 and 1209600',
        });

param.valueAsNumber // -1.8881545897087546e+289
  • What is the expected behavior (or behavior of feature suggested)?
    Return the token for that value.

  • Please tell us about your environment:

    • CDK CLI Version: 1.2.0
    • Module Version: 1.2.0
    • OS: OSX Mojave
    • Language: Typescript

Metadata

Metadata

Assignees

Labels

@aws-cdk/coreRelated to core CDK functionalitybugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions