Skip to content

Commit f97c7ce

Browse files
committed
eli-420 adding back prod AWS to job (we can extend to other tiers)
1 parent df2ed9a commit f97c7ce

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
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_DEV_ACCOUNT_ID }}:role/service-roles/github-actions-api-deployment-role
32+
role-to-assume: arn:aws:iam::${{ secrets.AWS_PROD_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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,13 +639,23 @@ resource "aws_iam_policy" "firehose_readonly" {
639639
}
640640

641641
resource "aws_iam_policy" "cloudwatch_management" {
642+
#checkov:skip=CKV_AWS_355: GetMetricWidgetImage requires wildcard resource
643+
#checkov:skip=CKV_AWS_290: GetMetricWidgetImage requires wildcard resource
642644
name = "cloudwatch-management"
643645
description = "Allow GitHub Actions to manage CloudWatch logs, alarms, and SNS topics"
644646
path = "/service-policies/"
645647

646648
policy = jsonencode({
647649
Version = "2012-10-17",
648650
Statement = [
651+
{
652+
Effect = "Allow",
653+
Action = [
654+
# GetMetricWidgetImage does not support resource-level permissions
655+
"cloudwatch:GetMetricWidgetImage"
656+
],
657+
Resource = "*"
658+
},
649659
{
650660
Effect = "Allow",
651661
Action = [
@@ -664,7 +674,6 @@ resource "aws_iam_policy" "cloudwatch_management" {
664674
"cloudwatch:TagResource",
665675
"cloudwatch:UntagResource",
666676
"cloudwatch:GetDashboard",
667-
"cloudwatch:GetMetricWidgetImage",
668677

669678
"sns:CreateTopic",
670679
"sns:DeleteTopic",

0 commit comments

Comments
 (0)