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

fix(elasticsearch): Defining 2 domains with logging enabled in the same stack fails on construct id conflict #12055

Merged
merged 2 commits into from
Dec 13, 2020

Conversation

peterb154
Copy link
Contributor

@peterb154 peterb154 commented Dec 13, 2020

2 elastic search Domains with logging enabled and deployed in the same stack fail to synth due to log group logical naming conflict.

BREAKING CHANGE: ES Domain LogGroup LogicalId will change, which will trigger new log group resources to be created

Fixes #12017


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 Dec 13, 2020

@iliapolo iliapolo changed the title fix(@aws0cdk/aws-elasticsearch): 2 domains 1 stack fix(elasticsearch): Defining 2 domains with logging enabled in the same stack fails on construct id conflict Dec 13, 2020
@github-actions github-actions bot added the @aws-cdk/aws-elasticsearch Related to Amazon Elasticsearch Service label Dec 13, 2020
@@ -81,7 +83,7 @@ describe('log groups', () => {
SEARCH_SLOW_LOGS: {
CloudWatchLogsLogGroupArn: {
'Fn::GetAtt': [
'SlowSearchLogsE00DC2E7',
cdkAssert.stringLike(`${logicalId}SlowSearchLogs*`),
Copy link
Contributor

Choose a reason for hiding this comment

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

Assert the concrete logical id that contains the domain as well. (in all tests)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iliapolo - so we should not use matchers for things like this? I assume that we want the test to break if the logicaIId changes?

Copy link
Contributor

Choose a reason for hiding this comment

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

@peterb154 exactly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iliapolo amended the commit with concrete logicalIds

@iliapolo iliapolo added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 13, 2020
Fixes issue aws#12017 where 2 elastic search Domains with logging enabled
and deployed in the same stack fail to synth due to log group logical
naming conflict.

BREAKING CHANGE: ES Domain LogGroup LogicalId will change, which will
trigger new log group resources to be created
@peterb154 peterb154 force-pushed the peterb154/#12017-2-esdomains-1-stack branch from 9798554 to c5bb888 Compare December 13, 2020 19:34
@mergify mergify bot dismissed iliapolo’s stale review December 13, 2020 19:34

Pull request has been modified.

Copy link
Contributor

@iliapolo iliapolo left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for this :)

@iliapolo iliapolo removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 13, 2020
@mergify
Copy link
Contributor

mergify bot commented Dec 13, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 549e19c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Dec 13, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit ec3ce19 into aws:master Dec 13, 2020
flochaz pushed a commit to flochaz/aws-cdk that referenced this pull request Jan 5, 2021
…me stack fails on construct id conflict (aws#12055)

2 elastic search Domains with logging enabled and deployed in the same stack fail to synth due to log group logical naming conflict.

BREAKING CHANGE: ES Domain LogGroup LogicalId will change, which will trigger new log group resources to be created

Fixes aws#12017

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(elasticsearch): Two ES Domains with logging cannot be created in the same stack
3 participants