Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(elasticsearch): support OpenSearch 1.0 #16467

Closed
1 of 2 tasks
jumic opened this issue Sep 12, 2021 · 2 comments
Closed
1 of 2 tasks

(elasticsearch): support OpenSearch 1.0 #16467

jumic opened this issue Sep 12, 2021 · 2 comments
Assignees
Labels
@aws-cdk/aws-elasticsearch Related to Amazon Elasticsearch Service effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p1

Comments

@jumic
Copy link
Contributor

jumic commented Sep 12, 2021

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

  1. Rename "Amazon Elasticsearch Service Construct Library" to "Amazon OpenSearch Service Construct Library" (README)
  2. Introduce OpenSearch in README and code documentation, explain that this construct can be used for OpenSearch and Elasticsearch.
  3. 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.
  4. Add new version constant ElasticsearchVersion.V_OPENSEARCH_1_0.
  5. 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

@jumic jumic added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 12, 2021
@github-actions github-actions bot added the @aws-cdk/aws-elasticsearch Related to Amazon Elasticsearch Service label Sep 12, 2021
@BenChaimberg BenChaimberg added effort/large Large work item – several weeks of effort needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p1 and removed needs-triage This issue or PR still needs to be triaged. labels Sep 12, 2021
@BenChaimberg
Copy link
Contributor

Thank you for leaving this feature request! The team has been working on this feature and we are just waiting on CloudFormation to release some changes of their own. Nothing is required from the community at this time, but of course we welcome your feedback on our implementation when it is publicized.

@mergify mergify bot closed this as completed in e6c4ca5 Sep 17, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

eladb pushed a commit to cdklabs/decdk that referenced this issue Jan 18, 2022
Amazon Elasticsearch Service is being rebranded to Amazon OpenSearch Service. All customer-facing references to Elasticsearch within AWS CDK must be replaced with their OpenSearch equivalent, including documentation and API. To avoid breaking existing customers, all API changes will be implemented as a deprecation of the old API and introduction of a new, rebranded API.

Concretely, this change consists of the following:

- add a disclaimer at the top of the @aws-cdk/aws-elasticsearch module README about the rebranding
- add migration instructions to the @aws-cdk/aws-elasticsearch module README
- introduce the @aws-cdk/aws-opensearch module
  - copy all files from the Elasticsearch module
  - uses new AWS::OpenSearch::Domain resource. CFN guarantees a no-replacement update when a resource moves from AWS::Elasticsearch::Domain to AWS::OpenSearch::Domain, meaning customers should be able to move from the old CDK module to the new one with no downtime.
  - rename DomainProps.cognitoKibanaAuth -> DomainProps.cognitoDashboardsAuth
  - replaces ElasticsearchVersion with OpenSearchVersion
    - ElasticsearchVersion.V{major}_{minor} -> OpenSearchVersion.ELASTICSEARCH_{major}_{minor}
    - ElasticsearchVersion.of(version: string) -> OpenSearchVersion.elasticsearch(version: string)
    - introduces OpenSearchVersion.OPENSEARCH_1_0 and OpenSearchVersion.openSearch(version: string)
  - replace .elasticsearch instance suffix with .search
  - rename logical ID and type of a custom resource (Custom::ElasticsearchAccessPolicy -> Custom::OpenSearchAccessPolicy) that we generate to update the domain's access policy. This will cause a resource replacement, which will avoid a CloudFormation error (Update of resource type is not permitted) for stacks that switch modules

Closes aws/aws-cdk#16467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-elasticsearch Related to Amazon Elasticsearch Service effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p1
Projects
None yet
Development

No branches or pull requests

2 participants