Skip to content

Commit 976913f

Browse files
authored
Merge branch 'main' into feature/terb-ELID-131-automated-deployment-networking-api
2 parents 03298b5 + 3f1839e commit 976913f

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

.github/workflows/cicd-2-publish.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,14 @@ jobs:
140140
# asset_path: ./build/lambda.zip
141141
# asset_name: lambda-${{ needs.metadata.outputs.version }}.zip
142142
# asset_content_type: application/zip
143-
success:
144-
name: "Success notification"
145-
runs-on: ubuntu-latest
146-
needs: [publish]
147-
steps:
148-
- name: "Check prerequisites for notification"
149-
id: check
150-
run: echo "secret_exist=${{ secrets.TEAMS_NOTIFICATION_WEBHOOK_URL != '' }}" >> $GITHUB_OUTPUT
151-
- name: "Notify on publishing packages"
152-
if: steps.check.outputs.secret_exist == 'true'
153-
uses: nhs-england-tools/[email protected]
143+
- name: "Notify Slack on PR merge"
144+
uses: slackapi/[email protected]
154145
with:
155-
github-token: ${{ secrets.GITHUB_TOKEN }}
156-
teams-webhook-url: ${{ secrets.TEAMS_NOTIFICATION_WEBHOOK_URL }}
157-
message-title: "Notification title"
158-
message-text: "This is a notification body"
159-
link: ${{ github.event.pull_request.html_url }}
146+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
147+
webhook-type: webhook-trigger
148+
payload: |
149+
status: "${{ job.status }}"
150+
link: "https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
151+
Author: "${{ github.actor }}"
152+
title: "Pushed to main"
153+
version: "${{ needs.metadata.outputs.version }}"

infrastructure/stacks/api-layer/iam_policies.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ data "aws_iam_policy_document" "dynamodb_write_policy_doc" {
2323

2424
# Attach dynamoDB write policy to external write role
2525
resource "aws_iam_role_policy" "external_dynamodb_write_policy" {
26+
count = length(aws_iam_role.write_access_role)
2627
name = "DynamoDBWriteAccess"
27-
role = aws_iam_role.write_access_role.id
28+
role = aws_iam_role.write_access_role[count.index].id
2829
policy = data.aws_iam_policy_document.dynamodb_write_policy_doc.json
2930
}
3031

@@ -160,5 +161,3 @@ resource "aws_kms_key_policy" "kms_key" {
160161
key_id = module.eligibility_status_table.dynamodb_kms_key_id
161162
policy = data.aws_iam_policy_document.kms_key_policy.json
162163
}
163-
164-

0 commit comments

Comments
 (0)