Skip to content

Commit 1b6f0c3

Browse files
authored
feat(opensearchservice): nodeoptions for domain (#32936)
### Issue # (if applicable) Closes #32553. ### Reason for this change #32553. Recently as a part of coordinator node project we introduced a new parameter called NodeOptions, currently its part of L1 construct but we wanted it to be part of L2 construct and that is why raising this PR. ### Description of changes The code is very much similar to - #28497 and follows all standard practices in the repository. ### Describe any new or updated permissions being added N/A ### Description of how you validated changes Unit tests - ``` > yarn test aws-opensearchservice yarn run v1.22.22 $ jest aws-opensearchservice PASS aws-opensearchservice/test/log-group-resource-policy.test.ts PASS aws-opensearchservice/test/opensearch-access-policy.test.ts PASS aws-opensearchservice/test/domain.test.ts (5.687 s) =============================== Coverage summary =============================== Statements : 43.87% ( 9437/21508 ) Branches : 23.09% ( 2037/8820 ) Functions : 25.62% ( 1229/4796 ) Lines : 44.6% ( 9285/20816 ) ================================================================================ Jest: "global" coverage threshold for statements (55%) not met: 43.87% Jest: "global" coverage threshold for branches (35%) not met: 23.09% Test Suites: 3 passed, 3 total Tests: 1326 passed, 1326 total Snapshots: 0 total Time: 7.538 s ``` Integration Tests - ``` Running in parallel across regions: us-east-1, us-east-2, us-west-2 Running test /Users/dubesar/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.nodeoptions.js in us-east-1 SUCCESS aws-opensearchservice/test/integ.opensearch.nodeoptions-OpenSearchInteg/DefaultTest 658.125s NO ASSERTIONS Test Results: Tests: 1 passed, 1 total ✨ Done in 659.62s. ``` Snapshots is also generated as a part of integration tests ### 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) YES ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent f418c5d commit 1b6f0c3

12 files changed

+827
-2
lines changed

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

+19
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.nodeoptions.js.snapshot/OpenSearchNodeOptionsIntegDefaultTestDeployAssert9170FAD5.template.json

+36
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.nodeoptions.js.snapshot/cdk-integ-os-nodeoptions.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"Resources": {
3+
"Domain19FCBCB91": {
4+
"Type": "AWS::OpenSearchService::Domain",
5+
"Properties": {
6+
"ClusterConfig": {
7+
"DedicatedMasterCount": 3,
8+
"DedicatedMasterEnabled": true,
9+
"DedicatedMasterType": "r5.large.search",
10+
"InstanceCount": 2,
11+
"InstanceType": "r5.large.search",
12+
"MultiAZWithStandbyEnabled": false,
13+
"NodeOptions": [
14+
{
15+
"NodeConfig": {
16+
"Count": 2,
17+
"Enabled": true,
18+
"Type": "m5.large.search"
19+
},
20+
"NodeType": "coordinator"
21+
}
22+
],
23+
"ZoneAwarenessConfig": {
24+
"AvailabilityZoneCount": 2
25+
},
26+
"ZoneAwarenessEnabled": true
27+
},
28+
"DomainEndpointOptions": {
29+
"EnforceHTTPS": false,
30+
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07"
31+
},
32+
"EBSOptions": {
33+
"EBSEnabled": true,
34+
"VolumeSize": 10,
35+
"VolumeType": "gp3"
36+
},
37+
"EncryptionAtRestOptions": {
38+
"Enabled": false
39+
},
40+
"EngineVersion": "OpenSearch_2.15",
41+
"LogPublishingOptions": {},
42+
"NodeToNodeEncryptionOptions": {
43+
"Enabled": false
44+
}
45+
},
46+
"UpdateReplacePolicy": "Delete",
47+
"DeletionPolicy": "Delete"
48+
}
49+
},
50+
"Parameters": {
51+
"BootstrapVersion": {
52+
"Type": "AWS::SSM::Parameter::Value<String>",
53+
"Default": "/cdk-bootstrap/hnb659fds/version",
54+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
55+
}
56+
},
57+
"Rules": {
58+
"CheckBootstrapVersion": {
59+
"Assertions": [
60+
{
61+
"Assert": {
62+
"Fn::Not": [
63+
{
64+
"Fn::Contains": [
65+
[
66+
"1",
67+
"2",
68+
"3",
69+
"4",
70+
"5"
71+
],
72+
{
73+
"Ref": "BootstrapVersion"
74+
}
75+
]
76+
}
77+
]
78+
},
79+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
80+
}
81+
]
82+
}
83+
}
84+
}

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

+1
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.nodeoptions.js.snapshot/integ.json

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)