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(events): cannot have more than one cross-account Rule #12538

Closed
wants to merge 2 commits into from

Conversation

mazayan
Copy link

@mazayan mazayan commented Jan 15, 2021

Fixes #12479


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

Note: this pull request is in reference to git issue: #12479

@gitpod-io
Copy link

gitpod-io bot commented Jan 15, 2021

@mazayan mazayan changed the title append construct name and unique id to event policy statement id fix: append construct name and unique id to event policy statement id Jan 15, 2021
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 38578de
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@skinny85
Copy link
Contributor

Assigned @rix0rrr , who now owns the @aws-cdk/aws-events module.

@NGL321 NGL321 changed the title fix: append construct name and unique id to event policy statement id fix(aws-events): append construct name and unique id to event policy statement id Jan 23, 2021
@github-actions github-actions bot added the @aws-cdk/aws-events Related to CloudWatch Events label Jan 23, 2021
@rix0rrr rix0rrr changed the title fix(aws-events): append construct name and unique id to event policy statement id fix(events): cannot have more than one cross-account Rule Jan 26, 2021
@@ -245,7 +245,7 @@ export class Rule extends Resource implements IRule {
});
new CfnEventBusPolicy(eventBusPolicyStack, 'GivePermToOtherAccount', {
action: 'events:PutEvents',
statementId: `Allow-account-${sourceAccount}`,
statementId: `Allow-account-${sourceAccount}-${Names.uniqueId(this)}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the maximum length of a Sid? Can you ensure this length never grows too large?

Copy link
Contributor

Choose a reason for hiding this comment

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

this.node.addr may be better.

@rix0rrr rix0rrr removed their assignment Jun 22, 2021
@rix0rrr rix0rrr added bug This issue is a bug. p1 and removed @aws-cdk/aws-events Related to CloudWatch Events labels Mar 4, 2022
cgarvis added a commit that referenced this pull request Mar 17, 2022
@cgarvis cgarvis closed this Mar 17, 2022
mergify bot pushed a commit that referenced this pull request Mar 18, 2022
Fixes #12479, Resolves #12538

----

*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
bug This issue is a bug. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(events): CDK tries to create event bus rules that already exist
5 participants