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

pipeline-event-notification-rule: PipelineEventNotificationRule Should Accept id Parameter #336

Open
2 tasks done
apogeeoak opened this issue Jun 18, 2024 · 0 comments
Open
2 tasks done

Comments

@apogeeoak
Copy link
Contributor

Describe the feature

PipelineEventNotificationRule should accept an id parameter instead of using a static string for the id.

Use Case

Creating two PipelineEventNotificationRule constructs in the same scope will throw an exception.

Proposed Solution

Update the constructor signature to include an id parameter to allow different PipelineEventNotificationRules to be uniquely identified.

Other Information

-  constructor(scope: CodePipeline, props: PipelineEventNotificationRuleProps) {
+  constructor(scope: CodePipeline, id: string, props: PipelineEventNotificationRuleProps) {
-    const targetTopic = Topic.fromTopicArn(scope, 'NotificationTopic', props.notificationTopicArn);
+    const targetTopic = Topic.fromTopicArn(scope, `NotificationTopic-${id}`, props.notificationTopicArn);
-    super(scope, `Pipeline-Event-Notification`, ruleProperties);
+    super(scope, `Pipeline-Event-Notification-${id}`, ruleProperties);

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Library version used

0.6.2

Environment details (OS name and version, etc.)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant