Skip to content

Commit

Permalink
Fix ChatBot channel ref + add notification management permissions (#650)
Browse files Browse the repository at this point in the history
**Why?**

The AWS Chatbot integration had an error that was introduced with the
refactoring in v3.2.0 release. This prevented ChatBot configurations to be
applied correctly.

Additionally, the pipeline creation process did not have the required
permissions to manage the pipeline notifications yet.

**What?**

Both issues are addressed in this change request.
  • Loading branch information
sbkok committed Aug 9, 2023
1 parent 046dfaf commit fa8ced3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,19 @@ Resources:
Condition:
StringEquals:
'codestar-connections:PassedToService': 'codepipeline.amazonaws.com'
- Effect: Allow
Sid: "AllowChatBotOperations"
Action:
- "codestar-notifications:CreateNotificationRule"
- "codestar-notifications:DeleteNotificationRule"
- "codestar-notifications:DescribeNotificationRule"
- "codestar-notifications:ListNotificationRules"
- "codestar-notifications:Subscribe"
- "codestar-notifications:TagResource"
- "codestar-notifications:Unsubscribe"
- "codestar-notifications:UntagResource"
- "codestar-notifications:UpdateNotificationRule"
Resource: "*"
- Effect: Allow
Action:
- "events:PutRule"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(
)
pipeline_arn = (
f"arn:{stack.partition}:codepipeline:{ADF_DEPLOYMENT_REGION}:"
"{ADF_DEPLOYMENT_ACCOUNT_ID}:{pipeline.ref}"
f"{ADF_DEPLOYMENT_ACCOUNT_ID}:{pipeline.ref}"
)
cp_notifications.CfnNotificationRule(
scope,
Expand Down

0 comments on commit fa8ced3

Please sign in to comment.