Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1649,6 +1649,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable {
ec2.InstanceClass.R6GD,
ec2.InstanceClass.I4G,
ec2.InstanceClass.I4I,
ec2.InstanceClass.I8G,
ec2.InstanceClass.IM4GN,
ec2.InstanceClass.R7GD,
];
Expand Down
23 changes: 21 additions & 2 deletions packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2004,6 +2004,7 @@ each(testedOpenSearchVersions).describe('custom error responses', (engineVersion
'im4gn.2xlarge.search',
'i4g.large.search',
'i4i.xlarge.search',
'i8g.4xlarge.search',
'r7gd.xlarge.search',
])('error when %s instance type is specified with EBS enabled', (dataNodeInstanceType) => {
expect(() => new Domain(stack, 'Domain2', {
Expand All @@ -2015,7 +2016,25 @@ each(testedOpenSearchVersions).describe('custom error responses', (engineVersion
volumeSize: 100,
volumeType: EbsDeviceVolumeType.GENERAL_PURPOSE_SSD,
},
})).toThrow(/I3, R6GD, I4G, I4I, IM4GN and R7GD instance types do not support EBS storage volumes./);
})).toThrow(/I3, R6GD, I4G, I4I, I8G, IM4GN and R7GD instance types do not support EBS storage volumes./);
});

test.each([
'i3.2xlarge.search',
'r6gd.large.search',
'im4gn.2xlarge.search',
'i4g.large.search',
'i4i.xlarge.search',
'i8g.4xlarge.search',
'r7gd.xlarge.search',
])('should not throw when %s instance type is specified without EBS enabled', (dataNodeInstanceType) => {
expect(() => new Domain(stack, 'Domain2', {
version: engineVersion,
capacity: {
dataNodeInstanceType,
},
ebs: { enabled: false },
})).not.toThrow();
});

test.each([
Expand Down Expand Up @@ -2056,7 +2075,7 @@ each(testedOpenSearchVersions).describe('custom error responses', (engineVersion
capacity: {
masterNodeInstanceType,
},
})).toThrow(/EBS volumes are required when using instance types other than R3, I3, R6GD, I4G, I4I, IM4GN or R7GD./);
})).toThrow(/EBS volumes are required when using instance types other than R3, I3, R6GD, I4G, I4I, I8G, IM4GN or R7GD./);
});

test('can use compatible master instance types that does not have local storage when data node type is i3 or r6gd', () => {
Expand Down
Loading