Skip to content

Commit

Permalink
feat(opensearch): add OpenSearch 2.13 engine version (#30399)
Browse files Browse the repository at this point in the history
### Reason for this change

[Amazon OpenSearch Service now supports OpenSearch version 2.13](https://aws.amazon.com/about-aws/whats-new/2024/05/amazon-opensearch-supports-opensearch-version-2-13/)

### Description of changes

Adds support for OpenSearch engine version 2.13

### Description of how you validated changes

`yarn test`

### 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)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
timbru31 committed Jun 11, 2024
1 parent 69c5dde commit db3e77d
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"EncryptionAtRestOptions": {
"Enabled": false
},
"EngineVersion": "OpenSearch_2.11",
"EngineVersion": "OpenSearch_2.13",
"LogPublishingOptions": {
"SEARCH_SLOW_LOGS": {
"Enabled": false
Expand Down Expand Up @@ -79,4 +79,4 @@
]
}
}
}
}

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
Expand Up @@ -7,7 +7,7 @@ class TestStack extends Stack {
super(scope, id, props);

const domainProps: opensearch.DomainProps = {
version: opensearch.EngineVersion.OPENSEARCH_2_11,
version: opensearch.EngineVersion.OPENSEARCH_2_13,
removalPolicy: RemovalPolicy.DESTROY,
logging: {
auditLogEnabled: false,
Expand All @@ -26,4 +26,4 @@ class TestStack extends Stack {

const app = new App();
new TestStack(app, 'cdk-integ-opensearch-with-logging-disabled');
app.synth();
app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"EncryptionAtRestOptions": {
"Enabled": false
},
"EngineVersion": "OpenSearch_2.11",
"EngineVersion": "OpenSearch_2.13",
"LogPublishingOptions": {},
"NodeToNodeEncryptionOptions": {
"Enabled": false
Expand Down Expand Up @@ -66,4 +66,4 @@
]
}
}
}
}

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
Expand Up @@ -9,7 +9,7 @@ class TestStack extends Stack {

// deploy the latest opensearch domain with minimal configuration
const domainProps: opensearch.DomainProps = {
version: opensearch.EngineVersion.OPENSEARCH_2_11,
version: opensearch.EngineVersion.OPENSEARCH_2_13,
removalPolicy: RemovalPolicy.DESTROY,
capacity: {
multiAzWithStandbyEnabled: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"EncryptionAtRestOptions": {
"Enabled": false
},
"EngineVersion": "OpenSearch_2.11",
"EngineVersion": "OpenSearch_2.13",
"LogPublishingOptions": {
"ES_APPLICATION_LOGS": {
"CloudWatchLogsLogGroupArn": {
Expand Down Expand Up @@ -73,4 +73,4 @@
]
}
}
}
}

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
Expand Up @@ -34,7 +34,7 @@ class TestStack extends Stack {
super(scope, id, props);

const domainProps: opensearch.DomainProps = {
version: opensearch.EngineVersion.OPENSEARCH_2_11,
version: opensearch.EngineVersion.OPENSEARCH_2_13,
removalPolicy: RemovalPolicy.DESTROY,
logging: {
appLogEnabled: true,
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-lib/aws-opensearchservice/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export class EngineVersion {
/** AWS OpenSearch 2.11 */
public static readonly OPENSEARCH_2_11 = EngineVersion.openSearch('2.11');

/** AWS OpenSearch 2.13 */
public static readonly OPENSEARCH_2_13 = EngineVersion.openSearch('2.13');

/**
* Custom ElasticSearch version
* @param version custom version number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const testedOpenSearchVersions = [
EngineVersion.OPENSEARCH_2_9,
EngineVersion.OPENSEARCH_2_10,
EngineVersion.OPENSEARCH_2_11,
EngineVersion.OPENSEARCH_2_13,
];

each(testedOpenSearchVersions).test('connections throws if domain is not placed inside a vpc', (engineVersion) => {
Expand Down Expand Up @@ -207,6 +208,7 @@ each([
[EngineVersion.OPENSEARCH_2_9, 'OpenSearch_2.9'],
[EngineVersion.OPENSEARCH_2_10, 'OpenSearch_2.10'],
[EngineVersion.OPENSEARCH_2_11, 'OpenSearch_2.11'],
[EngineVersion.OPENSEARCH_2_13, 'OpenSearch_2.13'],
]).test('minimal example renders correctly', (engineVersion, expectedCfVersion) => {
new Domain(stack, 'Domain', { version: engineVersion });

Expand Down

0 comments on commit db3e77d

Please sign in to comment.