Aws-cdk: aws-codestarnotifications: support NotificationRule

Created on 13 Nov 2019  路  2Comments  路  Source: aws/aws-cdk

__[Not a Contribution]__

With the introduction of notifications for AWS CodeCommit, AWS CodeBuild, AWS CodeDeploy, and AWS CodePipeline, it would be great if we can create CodeStar NotificationRule with aws-cdk

Use Case

Create CodeStar Notification Rule with aws-cdk

Proposed Solution

Implement CloudFormation Resource and CDK Construct for https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html

Other

Reference:

  • [ ] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

This is a :rocket: Feature Request

@aws-cdaws-codestarnotifications efforlarge feature-request in-progress p1

Most helpful comment

PR undergoing

All 2 comments

Hi @skinny85 and @LuqiPan
I would like to contribute this implementation for this issue and I have the same problem too, but I used L1 CDK construct to resolve my problem.

This issue also need to Implement chatbot.CfnSlackChannelConfiguration and codestarnotifications.CfnNotificationRule.

The use case and pseudo code like as below:

const codebuildProject = new codebuild.Project(this, 'MyCodebuild', {...});

const slackChannel = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', {...});
const topic = new sns.Topic(this, 'MyTopic', {...});

codebuildProject.addNotification({
  notificationRuleName: 'MyNotificationRule',
  targets: [
    new SlackNotificationTarget(slackChannel),
    new SNSTopicNotificationTarget(topic),
  ],
  events: [
    ProjectEvent.BUILD_STATE_SUCCEEDED,
    ProjectEvent.BUILD_STATE_FAILED,
  ],
});

Maybe you can see that in few days. :)

PR undergoing

Was this page helpful?
0 / 5 - 0 ratings