-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(elasticsearch): support OpenSearch 1.0 #16467
Description
AWS renamed Amazon Elasticsearch Service to Amazon OpenSearch Service. In addition, the new version OpenSearch 1.0 was introduced.
Announcement:
https://aws.amazon.com/about-aws/whats-new/2021/09/amazon-elasticsearch-service-amazon-opensearch-service-opensearch-1-0/
Use Case
Use new features introduced by OpenSearch 1.0.
Proposed Solution
- Rename "Amazon Elasticsearch Service Construct Library" to "Amazon OpenSearch Service Construct Library" (README)
- Introduce OpenSearch in README and code documentation, explain that this construct can be used for OpenSearch and Elasticsearch.
- Don't rename the module and the existing classes of this module, this would be a breaking change. The resources in CloudFormation were not renamed, too.
- Add new version constant
ElasticsearchVersion.V_OPENSEARCH_1_0. - Refactor validations - "Elasticsearch 5.1 or later or any version of OpenSearch" must consider that version 1.0 (OpenSearch) and above is supported while Elasticsearch versions less than 5.1 are not supported.
Proposed Solution for new version constants
Add new enum EngineType with values ELASTICSEARCH and OPENSEARCH,
New versions can be initialized by passing the optional parameter engineType.
public static of(version: string, engineType: EngineType = EngineType.ELASTICSEARCH) {
return new ElasticsearchVersion(version, engineType);
}The specific version constant looks like this:
/** AWS OpenSearch 1.0 */
public static readonly V_OPENSEARCH_1_0 = ElasticsearchVersion.of('1.0', EngineType.OPENSEARCH);The enum provides the posibility to differentiate between Elasticsearch and OpenSearch versions.
Other
If you welcome community contribution to this feature request, could you please give a short feedback to the proposed solution? Thanks.
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request