aws / aws/jsii

OpenSearch: EBSOptions.Iops and EBSOptions.VolumeSize type should be `int`

Open
#4,504 2 comments 0 reactions 0 assignees View on GitHub
bug documentation jsii language/dotnet p1
Dominant language
TypeScript
Stars
2.9k
Forks
267
Avg merge
1d 25m
Merged PRs (30d)
14

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Start at the EBSOptions definition and read the AWS OpenSearch API reference linked in the issue to confirm the expected integer types. Update the model types for Iops and VolumeSize, then verify that the generated .NET API accepts integer values and produces a CloudFormation template that passes property validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
api, backend-api-design
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.