Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JCKortlang opened this issue May 3, 2024 · 2 comments
Open
Labels
bug This issue is a bug. documentation This is a problem with documentation. jsii language/dotnet Related to .NET bindings (C#, F#, ...) p1

Comments

@JCKortlang
Copy link

JCKortlang commented May 3, 2024

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

@JCKortlang JCKortlang added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 3, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 3, 2024
@khushail
Copy link
Contributor

khushail commented May 3, 2024

Hi @JCKortlang , thanks for reaching out.

I see the cloudformation implementation and CDK typescript implementation specifies both props as Int. This is code level implementation which also declares these as int -https://github.com/aws/aws-cdk/blob/491434e19ea4566ef90ff137efe62e694bb03cca/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts#L155

but this is incorrectly interpreted to .NET docs as double. Wonder why that happened. Please see that the documentation is auto generated from the cloudformation docs. However I will reach out to team for the insights how this can be corrected.

@khushail khushail added documentation This is a problem with documentation. p2 labels May 3, 2024
@JCKortlang
Copy link
Author

@khushail it is not just the documentation. The cdk library in .NET models it as a double. Which allows the invalid values to be set.

@khushail khushail added jsii language/dotnet Related to .NET bindings (C#, F#, ...) p1 and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 6, 2024
@khushail khushail transferred this issue from aws/aws-cdk May 6, 2024
@khushail khushail removed the p2 label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. documentation This is a problem with documentation. jsii language/dotnet Related to .NET bindings (C#, F#, ...) p1
Projects
None yet
Development

No branches or pull requests

2 participants