From a2ac36e6dbe486aa87e46d17f5472d6af6c39397 Mon Sep 17 00:00:00 2001 From: T31M <4603377+T31M@users.noreply.github.com> Date: Tue, 5 Apr 2022 19:24:17 +0200 Subject: [PATCH] feat(opensearch): Add latest Opensearch Version 1.2 (#19749) ---- ### Add new OpenSearch Version 1.2 **Related Announcement**: https://aws.amazon.com/about-aws/whats-new/2022/04/amazon-opensearch-supports-version-1-2/ Upgrade option already available in AWS console. List an example of the new version (here: 1.2) via cli in 2 different regions: ``` aws es list-elasticsearch-versions --region=eu-west-1 { "ElasticsearchVersions": [ "OpenSearch_1.2", "OpenSearch_1.1", "OpenSearch_1.0", "7.10", "7.9", ... ] } ``` or ``` aws es list-elasticsearch-versions --region=us-east-1 { "ElasticsearchVersions": [ "OpenSearch_1.2", "OpenSearch_1.1", "OpenSearch_1.0", "7.10", "7.9", ... ] } ``` ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) * [x] Did you use cdk-integ to deploy the infrastructure and generate the snapshot (i.e. cdk-integ without --dry-run)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-appsync/README.md | 2 +- .../aws-appsync/test/integ.graphql-opensearch.expected.json | 2 +- packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts | 2 +- packages/@aws-cdk/aws-opensearchservice/lib/version.ts | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 721fa10390784..d7a54f9887cc7 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -252,7 +252,7 @@ import * as opensearch from '@aws-cdk/aws-opensearchservice'; const user = new iam.User(this, 'User'); const domain = new opensearch.Domain(this, 'Domain', { - version: opensearch.EngineVersion.OPENSEARCH_1_1, + version: opensearch.EngineVersion.OPENSEARCH_1_2, removalPolicy: RemovalPolicy.DESTROY, fineGrainedAccessControl: { masterUserArn: user.userArn }, encryptionAtRest: { enabled: true }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.expected.json index 1977b2d346896..803b2f0226d72 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.expected.json @@ -39,7 +39,7 @@ "EncryptionAtRestOptions": { "Enabled": true }, - "EngineVersion": "OpenSearch_1.1", + "EngineVersion": "OpenSearch_1.2", "LogPublishingOptions": {}, "NodeToNodeEncryptionOptions": { "Enabled": true diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts index e055bfe15c83b..cb96dee17e90f 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts @@ -8,7 +8,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'appsync-opensearch'); const user = new User(stack, 'User'); const domain = new opensearch.Domain(stack, 'Domain', { - version: opensearch.EngineVersion.OPENSEARCH_1_1, + version: opensearch.EngineVersion.OPENSEARCH_1_2, removalPolicy: cdk.RemovalPolicy.DESTROY, fineGrainedAccessControl: { masterUserArn: user.userArn, diff --git a/packages/@aws-cdk/aws-opensearchservice/lib/version.ts b/packages/@aws-cdk/aws-opensearchservice/lib/version.ts index 119b7844502dc..b989ac4867b72 100644 --- a/packages/@aws-cdk/aws-opensearchservice/lib/version.ts +++ b/packages/@aws-cdk/aws-opensearchservice/lib/version.ts @@ -65,6 +65,9 @@ export class EngineVersion { /** AWS OpenSearch 1.1 */ public static readonly OPENSEARCH_1_1 = EngineVersion.openSearch('1.1'); + /** AWS OpenSearch 1.2 */ + public static readonly OPENSEARCH_1_2 = EngineVersion.openSearch('1.2'); + /** * Custom ElasticSearch version * @param version custom version number