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

chore(opensearchservice): t3 instance type does not support Multi-AZ with standby feature #29607

Merged
merged 4 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,10 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable {
}
}

if (isSomeInstanceType('t3') && multiAzWithStandbyEnabled) {
throw new Error('T3 instance types does not support Multi-AZ with standby feature.');
tmokmss marked this conversation as resolved.
Show resolved Hide resolved
}

const offPeakWindowEnabled = props.offPeakWindowEnabled ?? props.offPeakWindowStart !== undefined;
if (offPeakWindowEnabled) {
this.validateWindowStartTime(props.offPeakWindowStart);
Expand Down
21 changes: 21 additions & 0 deletions packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,27 @@ each([testedOpenSearchVersions]).test('can specify multiAZWithStandbyEnabled in
});
});

each([testedOpenSearchVersions]).test('multiAZWithStandbyEnabled: true throws with t3 instance type (data node)', (engineVersion) => {
expect(() => new Domain(stack, 'Domain', {
version: engineVersion,
capacity: {
dataNodeInstanceType: 't3.medium.search',
multiAzWithStandbyEnabled: true,
},
})).toThrow(/T3 instance types does not support Multi-AZ with standby feature\./);
});

each([testedOpenSearchVersions]).test('multiAZWithStandbyEnabled: true throws with t3 instance type (master node)', (engineVersion) => {
expect(() => new Domain(stack, 'Domain', {
version: engineVersion,
capacity: {
masterNodeInstanceType: 't3.medium.search',
masterNodes: 1,
multiAzWithStandbyEnabled: true,
},
})).toThrow(/T3 instance types does not support Multi-AZ with standby feature\./);
});

each([testedOpenSearchVersions]).test('ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY set multiAZWithStandbyEnabled value', (engineVersion) => {
const stackWithFlag = new Stack(app, 'StackWithFlag', {
env: { account: '1234', region: 'testregion' },
Expand Down
Loading