__[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
Create CodeStar Notification Rule with aws-cdk
Implement CloudFormation Resource and CDK Construct for https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html
Reference:
This is a :rocket: Feature Request
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
Most helpful comment
PR undergoing