Commit 034baf3
authored
feat(opensearchservice): support OI2 instance type with local NVMe storage (#36700)
### Issue # (if applicable)
Closes #36698
### Reason for this change
OI2 is an OpenSearch-specific instance type that uses local NVMe storage and does not support EBS volumes. Currently, CDK validation incorrectly rejects OI2 instance types when ebs: { enabled: false } is specified, throwing:
ValidationError: EBS volumes are required when using instance types other than R3, I3, R6GD, I4G, I4I, I8G, IM4GN, R7GD or R8GD.
### Description of changes
- Added 'oi2' to the unSupportEbsInstanceType array in domain.ts to recognize OI2 as an instance type that doesn't support EBS (and therefore supports instance storage)
- Since OI2 is an OpenSearch-specific instance family (not an EC2 instance class), it's added as a string literal rather than using ec2.InstanceClass
- Updated the comment to include OI2 and added a reference to the AWS documentation
- Updated unit tests to include OI2 test cases and updated expected error messages
### Describe any new or updated permissions being added
N/A - No IAM permission changes.
### Description of how you validated changes
- Added unit tests for OI2 instance type:
- Error when OI2 is specified with EBS enabled
- No error when OI2 is specified without EBS enabled
- All existing tests continue to pass
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent 3462233 commit 034baf3
File tree
2 files changed
+8
-4
lines changed- packages/aws-cdk-lib/aws-opensearchservice
- lib
- test
2 files changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| 1698 | + | |
1698 | 1699 | | |
1699 | 1700 | | |
1700 | 1701 | | |
| |||
1731 | 1732 | | |
1732 | 1733 | | |
1733 | 1734 | | |
1734 | | - | |
| 1735 | + | |
1735 | 1736 | | |
| 1737 | + | |
1736 | 1738 | | |
1737 | 1739 | | |
1738 | 1740 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2081 | 2081 | | |
2082 | 2082 | | |
2083 | 2083 | | |
| 2084 | + | |
2084 | 2085 | | |
2085 | 2086 | | |
2086 | 2087 | | |
| |||
2091 | 2092 | | |
2092 | 2093 | | |
2093 | 2094 | | |
2094 | | - | |
| 2095 | + | |
2095 | 2096 | | |
2096 | 2097 | | |
2097 | 2098 | | |
| |||
2103 | 2104 | | |
2104 | 2105 | | |
2105 | 2106 | | |
| 2107 | + | |
2106 | 2108 | | |
2107 | 2109 | | |
2108 | 2110 | | |
| |||
2142 | 2144 | | |
2143 | 2145 | | |
2144 | 2146 | | |
2145 | | - | |
| 2147 | + | |
2146 | 2148 | | |
2147 | 2149 | | |
2148 | 2150 | | |
| |||
2151 | 2153 | | |
2152 | 2154 | | |
2153 | 2155 | | |
2154 | | - | |
| 2156 | + | |
2155 | 2157 | | |
2156 | 2158 | | |
2157 | 2159 | | |
| |||
0 commit comments