Skip to content

OpenSearch: EBSOptions.Iops and EBSOptions.VolumeSize type should be int #4504

@JCKortlang

Description

@JCKortlang

Describe the bug

EBSOptions models Iops and VolumeSize as double but the cloud formation template defines them as int. Deployments fail when these values are set to none integer values.

Properties validation failed for resource OpenSearchDomain464FB114 with message: [#/EBSOptions/Iops: expected type: Integer, found: Double, #/EBSOptions/VolumeSize: expected type: Integer, found: Double

Expected Behavior

EBSOptions.Iops and EBSOptions.VolumeSize type should be int

https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_EBSOptions.html

Current Behavior

EBSOptions.Iops and EBSOptions.VolumeSize are double

Reproduction Steps

//From https://docs.aws.amazon.com/cdk/api/v2/dotnet/api/Amazon.CDK.AWS.OpenSearchService.Domain.html
var domain = new Domain(this, "Domain", new DomainProps {
    Version = EngineVersion.OPENSEARCH_1_0,
    Ebs = new EbsOptions {
        VolumeSize = 100.1,
        Iops = 3000.1,
        VolumeType = EbsDeviceVolumeType.GENERAL_PURPOSE_SSD
    },
    NodeToNodeEncryption = true,
    EncryptionAtRest = new EncryptionAtRestOptions {
        Enabled = true
    }
});

Possible Solution

Change EBSOptions.Iops and EBSOptions.VolumeSize to int

Additional Information/Context

No response

CDK CLI Version

2.136.1 (build 6f21c1d)

Framework Version

2.139.0

Node.js Version

v21.7.2

OS

MacOS 13.6.6 (22G630)

Language

.NET

Language Version

8.0.101

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.documentationThis is a problem with documentation.jsiilanguage/dotnetRelated to .NET bindings (C#, F#, ...)p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions