Skip to content

Commit 82420f0

Browse files
authored
chore(opensearchservice): add support for R8GD instance types (#36059)
## Issue Closes #36056 ## Summary Adds support for R8GD (Graviton4-based) instance types in OpenSearch Service domains by updating validation logic to recognize R8GD instances as having local NVMe storage, eliminating the requirement for EBS volumes. ## Reason for this change When attempting to create an OpenSearch domain with R8GD instance types (e.g., `r8gd.medium.search`), CDK throws a validation error requiring EBS volumes. However, R8GD instances have local NVMe storage (indicated by the "d" suffix) and should not require EBS volumes, similar to other instance families like R6GD, R7GD, I3, I4G, I4I, I8G, and IM4GN. AWS announced R8GD instance availability for OpenSearch Service in October 2025 across 23 regions, but CDK's validation logic was not updated to recognize these new Graviton4-based instances. ## Description of changes - **Core Change**: Added `ec2.InstanceClass.R8GD` to the `unSupportEbsInstanceType` array in `domain.ts` - **Unit Tests**: Updated parameterized tests to include R8GD test cases for both positive (no EBS) and negative (with EBS) scenarios - **Error Messages**: Updated validation error message patterns to include R8GD - **Integration Tests**: Added R8GD test case to `integ.opensearch.ebs.ts` for CloudFormation synthesis validation ### Files Modified 1. `packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts` - Added R8GD to validation array 2. `packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts` - Updated unit tests with R8GD cases 3. `packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ebs.ts` - Added integration test ## Description of how you validated changes - **Unit Tests**: All 1736 unit tests pass, including 30 R8GD-specific test cases - Verified error thrown when R8GD used WITH EBS enabled - Verified no error when R8GD used WITHOUT EBS enabled - Validated error messages include "R8GD" in validation text - **Integration Tests**: CloudFormation template synthesis validated with R8GD instance type - **Pattern Validation**: Follows exact pattern from R7GD addition (commit e364d2b) - **Regression Testing**: No impact on existing instance type validation ## 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) --- ### AWS CDK Automation *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 1ace1ef commit 82420f0

File tree

10 files changed

+558
-52
lines changed

10 files changed

+558
-52
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ebs.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ebs.js.snapshot/cdk-integ-opensearch-instance-store.assets.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ebs.js.snapshot/cdk-integ-opensearch-instance-store.template.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,35 @@
8686
},
8787
"UpdateReplacePolicy": "Delete",
8888
"DeletionPolicy": "Delete"
89+
},
90+
"Domain4590DF99F": {
91+
"Type": "AWS::OpenSearchService::Domain",
92+
"Properties": {
93+
"ClusterConfig": {
94+
"DedicatedMasterEnabled": false,
95+
"InstanceCount": 1,
96+
"InstanceType": "r8gd.medium.search",
97+
"MultiAZWithStandbyEnabled": false,
98+
"ZoneAwarenessEnabled": false
99+
},
100+
"DomainEndpointOptions": {
101+
"EnforceHTTPS": false,
102+
"TLSSecurityPolicy": "Policy-Min-TLS-1-2-2019-07"
103+
},
104+
"EBSOptions": {
105+
"EBSEnabled": false
106+
},
107+
"EncryptionAtRestOptions": {
108+
"Enabled": false
109+
},
110+
"EngineVersion": "OpenSearch_2.17",
111+
"LogPublishingOptions": {},
112+
"NodeToNodeEncryptionOptions": {
113+
"Enabled": false
114+
}
115+
},
116+
"UpdateReplacePolicy": "Delete",
117+
"DeletionPolicy": "Delete"
89118
}
90119
},
91120
"Parameters": {

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ebs.js.snapshot/cdk.out

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ebs.js.snapshot/integ.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)