Skip to content

Commit

Permalink
feat(opensearchservice): nodeoptions for domain (#32936)
Browse files Browse the repository at this point in the history
### 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*
  • Loading branch information
dubesar authored Mar 3, 2025
1 parent f418c5d commit 1b6f0c3
Show file tree
Hide file tree
Showing 12 changed files with 827 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"Resources": {
"Domain19FCBCB91": {
"Type": "AWS::OpenSearchService::Domain",
"Properties": {
"ClusterConfig": {
"DedicatedMasterCount": 3,
"DedicatedMasterEnabled": true,
"DedicatedMasterType": "r5.large.search",
"InstanceCount": 2,
"InstanceType": "r5.large.search",
"MultiAZWithStandbyEnabled": false,
"NodeOptions": [
{
"NodeConfig": {
"Count": 2,
"Enabled": true,
"Type": "m5.large.search"
},
"NodeType": "coordinator"
}
],
"ZoneAwarenessConfig": {
"AvailabilityZoneCount": 2
},
"ZoneAwarenessEnabled": true
},
"DomainEndpointOptions": {
"EnforceHTTPS": false,
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07"
},
"EBSOptions": {
"EBSEnabled": true,
"VolumeSize": 10,
"VolumeType": "gp3"
},
"EncryptionAtRestOptions": {
"Enabled": false
},
"EngineVersion": "OpenSearch_2.15",
"LogPublishingOptions": {},
"NodeToNodeEncryptionOptions": {
"Enabled": false
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1b6f0c3

Please sign in to comment.