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

refactor(elasticsearch): Simplify and remove redundant resources for elasticsearch #12928

Conversation

dsharkou
Copy link

@dsharkou dsharkou commented Feb 8, 2021


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Feb 8, 2021

@dsharkou dsharkou marked this pull request as draft February 8, 2021 21:23
@mergify
Copy link
Contributor

mergify bot commented Feb 8, 2021

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@dsharkou dsharkou changed the title Simplify and remove redundant resources for elasticsearch feat: Simplify and remove redundant resources for elasticsearch Feb 8, 2021
@dsharkou dsharkou changed the title feat: Simplify and remove redundant resources for elasticsearch refactor: Simplify and remove redundant resources for elasticsearch Feb 8, 2021
@dsharkou dsharkou marked this pull request as ready for review February 8, 2021 23:49
@dsharkou
Copy link
Author

dsharkou commented Feb 8, 2021

Looks like AutoBuildProject is not working properly because I see lots of PRs with the same issue I'm facing with.
Anyway I hope elasticsearch were tests fixed because I couldn't check them on local environment

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 9e6843f
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@iliapolo iliapolo changed the title refactor: Simplify and remove redundant resources for elasticsearch refactor(elasticsearch): Simplify and remove redundant resources for elasticsearch Feb 23, 2021
@github-actions github-actions bot added the @aws-cdk/aws-elasticsearch Related to Amazon Elasticsearch Service label Feb 23, 2021
@@ -1594,6 +1598,9 @@ export class Domain extends DomainBase implements IDomain {
this.domain = new CfnDomain(this, 'Resource', {
domainName: this.physicalName,
elasticsearchVersion,
accessPolicies: new iam.PolicyDocument({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember we intentionally didn't use this because of some limitation it presented. @stephanh Do you remember what it was?

Copy link
Author

@dsharkou dsharkou Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iliapolo It would be great to understand the meaning (@stephanh). Anyway I tested it with CfnDomain and it was deployed and it's working well.
However I'd like to use aws-elasticsearch lib and I hope we can improve and remove redundant code (piece of CF stack).

One more question - do you have any ETA on marking as stable (right now it has experimental status)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the issue we had around this #8369 (comment).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsharkou So the reason we did this is because we wanted to include the domain ARN in the resource policy.

Something doesn't add up here, since the policy still contains this.domainArn, I would expect the integration test to fail. Are you sure to ran it with the up to date code?

In any case if we can just use * there instead, i'm also good with that. Once you get the build passing, i'm happy to merge this.

Regarding the stability of the module, no ETA just yet, but we are starting to consider it. We will update in the tracking issue.

: props.accessPolicies;

if (accessPolicyStatements != null) {
const accessPolicy = new ElasticsearchAccessPolicy(this, 'ESAccessPolicy', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are able to not use ElasticsearchAccessPolicy then I think it would be good to delete that whole custom resource and the corresponding tests.

@iliapolo
Copy link
Contributor

iliapolo commented May 5, 2021

@dsharkou Are you still pursuing this PR?

@iliapolo iliapolo added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label May 5, 2021
@github-actions
Copy link

This PR has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels May 13, 2021
@github-actions github-actions bot closed this May 18, 2021
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 closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants