Skip to content

Commit

Permalink
feat(opensearch): opensearch 2.7 engine version (aws#26313)
Browse files Browse the repository at this point in the history
[Amazon OpenSearch Service now supports OpenSearch version 2.7](https://aws.amazon.com/about-aws/whats-new/2023/07/amazon-opensearch-service-opensearch-version-2-7/) and this PR adds the support.

Closes #<issue number here>.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
pahud authored and bmoffatt committed Jul 28, 2023
1 parent fa8726a commit c15ea22
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "31.0.0",
"version": "32.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "31.0.0",
"version": "32.0.0",
"files": {
"1efe359cf8a4ef4cca317d69c2f109efd4f9561e43279e2523468a2ee6f98d46": {
"92f1cdc59ceaf5ee6852a715bbbc3c03a3c592f5049d88c0aa67001e43b87313": {
"source": {
"path": "cdk-integ-opensearch.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "1efe359cf8a4ef4cca317d69c2f109efd4f9561e43279e2523468a2ee6f98d46.json",
"objectKey": "92f1cdc59ceaf5ee6852a715bbbc3c03a3c592f5049d88c0aa67001e43b87313.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"EncryptionAtRestOptions": {
"Enabled": false
},
"EngineVersion": "OpenSearch_2.5",
"EngineVersion": "OpenSearch_2.7",
"LogPublishingOptions": {},
"NodeToNodeEncryptionOptions": {
"Enabled": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"31.0.0"}
{"version":"32.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "31.0.0",
"version": "32.0.0",
"testCases": {
"Integ/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "31.0.0",
"version": "32.0.0",
"artifacts": {
"cdk-integ-opensearch.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1efe359cf8a4ef4cca317d69c2f109efd4f9561e43279e2523468a2ee6f98d46.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/92f1cdc59ceaf5ee6852a715bbbc3c03a3c592f5049d88c0aa67001e43b87313.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,44 @@
"encryptionAtRestOptions": {
"enabled": false
},
"engineVersion": "OpenSearch_2.5",
"engineVersion": "OpenSearch_2.7",
"logPublishingOptions": {},
"nodeToNodeEncryptionOptions": {
"enabled": false
}
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.aws_opensearchservice.Domain",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
},
"BootstrapVersion": {
"id": "BootstrapVersion",
"path": "cdk-integ-opensearch/BootstrapVersion",
"constructInfo": {
"fqn": "aws-cdk-lib.CfnParameter",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
},
"CheckBootstrapVersion": {
"id": "CheckBootstrapVersion",
"path": "cdk-integ-opensearch/CheckBootstrapVersion",
"constructInfo": {
"fqn": "aws-cdk-lib.CfnRule",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.Stack",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
},
"Integ": {
Expand All @@ -89,7 +89,7 @@
"path": "Integ/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.270"
"version": "10.2.55"
}
},
"DeployAssert": {
Expand All @@ -100,22 +100,22 @@
"id": "BootstrapVersion",
"path": "Integ/DefaultTest/DeployAssert/BootstrapVersion",
"constructInfo": {
"fqn": "aws-cdk-lib.CfnParameter",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
},
"CheckBootstrapVersion": {
"id": "CheckBootstrapVersion",
"path": "Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
"constructInfo": {
"fqn": "aws-cdk-lib.CfnRule",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.Stack",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
}
},
Expand All @@ -135,13 +135,13 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.270"
"version": "10.2.55"
}
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.App",
"version": "0.0.0"
"fqn": "constructs.Construct",
"version": "10.2.55"
}
}
}
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.5'),
version: opensearch.EngineVersion.OPENSEARCH_2_7,
removalPolicy: RemovalPolicy.DESTROY,
};

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 @@ -84,6 +84,9 @@ export class EngineVersion {
/** AWS OpenSearch 2.5 */
public static readonly OPENSEARCH_2_5 = EngineVersion.openSearch('2.5');

/** AWS OpenSearch 2.7 */
public static readonly OPENSEARCH_2_7 = EngineVersion.openSearch('2.7');

/**
* Custom ElasticSearch version
* @param version custom version number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const testedOpenSearchVersions = [
EngineVersion.OPENSEARCH_1_3,
EngineVersion.OPENSEARCH_2_3,
EngineVersion.OPENSEARCH_2_5,
EngineVersion.OPENSEARCH_2_7,
];

each(testedOpenSearchVersions).test('connections throws if domain is not placed inside a vpc', (engineVersion) => {
Expand Down Expand Up @@ -198,6 +199,7 @@ each([
[EngineVersion.OPENSEARCH_1_3, 'OpenSearch_1.3'],
[EngineVersion.OPENSEARCH_2_3, 'OpenSearch_2.3'],
[EngineVersion.OPENSEARCH_2_5, 'OpenSearch_2.5'],
[EngineVersion.OPENSEARCH_2_7, 'OpenSearch_2.7'],
]).test('minimal example renders correctly', (engineVersion, expectedCfVersion) => {
new Domain(stack, 'Domain', { version: engineVersion });

Expand Down

0 comments on commit c15ea22

Please sign in to comment.