Skip to content

Commit df2ed9a

Browse files
committed
eli-420 adding github permissions
1 parent 1d1f4ee commit df2ed9a

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/monthly-capacity-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: "Configure AWS Credentials"
3030
uses: aws-actions/configure-aws-credentials@v5
3131
with:
32-
role-to-assume: arn:aws:iam::${{ secrets.AWS_PROD_ACCOUNT_ID }}:role/service-roles/github-actions-api-deployment-role
32+
role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/service-roles/github-actions-api-deployment-role
3333
aws-region: eu-west-2
3434

3535
- name: Generate dashboard report

infrastructure/stacks/iams-developer-roles/github_actions_policies.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ resource "aws_iam_policy" "cloudwatch_management" {
663663
"cloudwatch:ListTagsForResource",
664664
"cloudwatch:TagResource",
665665
"cloudwatch:UntagResource",
666+
"cloudwatch:GetDashboard",
667+
"cloudwatch:GetMetricWidgetImage",
666668

667669
"sns:CreateTopic",
668670
"sns:DeleteTopic",
@@ -683,6 +685,7 @@ resource "aws_iam_policy" "cloudwatch_management" {
683685
"arn:aws:logs:${var.default_aws_region}:${data.aws_caller_identity.current.account_id}:log-group:aws-wafv2-logs-*",
684686
"arn:aws:logs:${var.default_aws_region}:${data.aws_caller_identity.current.account_id}:log-group:aws-waf-logs-*",
685687
"arn:aws:cloudwatch:${var.default_aws_region}:${data.aws_caller_identity.current.account_id}:alarm:*",
688+
"arn:aws:cloudwatch::${data.aws_caller_identity.current.account_id}:dashboard/Demand_And_Capacity_*",
686689
"arn:aws:sns:${var.default_aws_region}:${data.aws_caller_identity.current.account_id}:cloudwatch-security-alarms*",
687690
"arn:aws:logs:${var.default_aws_region}:${data.aws_caller_identity.current.account_id}:log-group:/aws/apigateway/default-eligibility-signposting-api*",
688691
]

infrastructure/stacks/iams-developer-roles/iams_permissions_boundary.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ data "aws_iam_policy_document" "permissions_boundary" {
2626
"cloudwatch:ListTagsForResource",
2727
"cloudwatch:TagResource",
2828
"cloudwatch:UntagResource",
29+
"cloudwatch:GetDashboard",
30+
"cloudwatch:GetMetricWidgetImage",
2931

3032
# DynamoDB - table management
3133
"dynamodb:DescribeTimeToLive",

0 commit comments

Comments
 (0)