Created
September 11, 2020 07:16
-
-
Save andreidiaconu90/b93c169c3f7a2601eadd39dd0821cc5f to your computer and use it in GitHub Desktop.
webhook-definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyCloudWatchWebHook: | |
Type: "AWS::Events::Rule" | |
Properties: | |
EventPattern: | |
source: | |
- aws.codecommit | |
detail-type: | |
- "CodeCommit Repository State Change" | |
resources: | |
- !Join | |
- "" | |
- - "arn:aws:codecommit:*:" | |
- !Ref "AWS::AccountId" | |
- ":" | |
- my-repository-name | |
detail: | |
event: | |
- referenceCreated | |
- referenceUpdated | |
referenceType: | |
- branch | |
referenceName: | |
- master | |
Targets: | |
- Arn: !Join | |
- "" | |
- - "arn:aws:codepipeline:" | |
- !Ref "AWS::Region" | |
- ":" | |
- !Ref "AWS::AccountId" | |
- ":" | |
- !Ref MyCodePipeline # reference to the name of the CodePipeline resource | |
RoleArn: !GetAtt | |
- MyCloudWatchWebHookRole # reference to the webhook role we've created in the previous step | |
- Arn | |
Id: my-webhook # we'll not use this, but it's a required property so you can put anything you want here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment