by shigemk2

当面は技術的なことしか書かない

CodePipelineの通知のCloudFormation

CodePipelineの通知の実体はCodeStarNotifications

書き方例。SNSのTopicPolicyも追加してやること。

Resources:
  CodePipelineStatusCheckNotification:
    Type: AWS::CodeStarNotifications::NotificationRule
    Properties:
      Name: 'My Notification Rule for Comments on Commits'
      DetailType: FULL
      Resource: 'arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo'
      EventTypeIds: ["codepipeline-pipeline-pipeline-execution-started","codepipeline-pipeline-pipeline-execution-failed","codepipeline-pipeline-pipeline-execution-succeeded"]
      Targets:
        - TargetType: SNS
          TargetAddress: 'arn:aws:sns:us-east-2:123456789012:MyNotificationTopic'

AWS::CodeStarNotifications::NotificationRule - AWS CloudFormation