-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Expand file tree
/
Copy pathinteg.opensearch.min.ts
More file actions
34 lines (28 loc) · 1.04 KB
/
integ.opensearch.min.ts
File metadata and controls
34 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as opensearch from 'aws-cdk-lib/aws-opensearchservice';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
class TestStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const versions = [
opensearch.EngineVersion.OPENSEARCH_2_13,
opensearch.EngineVersion.OPENSEARCH_2_15,
opensearch.EngineVersion.OPENSEARCH_2_17,
];
// deploy opensearch domain with minimal configuration
versions.forEach((version) => {
const domainProps: opensearch.DomainProps = {
version,
removalPolicy: RemovalPolicy.DESTROY,
capacity: {
multiAzWithStandbyEnabled: false,
},
};
new opensearch.Domain(this, version.version, domainProps);
});
}
}
const app = new App();
const stack = new TestStack(app, 'cdk-integ-opensearch-min');
new IntegTest(app, 'integ-openseach-min', { testCases: [stack] });