Skip to content

Commit 6903d4b

Browse files
committed
eli-279 fine tuning api gateway permissions
1 parent ea1f4c9 commit 6903d4b

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,23 @@ resource "aws_iam_policy" "api_infrastructure" {
182182
Effect = "Allow",
183183
Action = [
184184
"logs:Describe*",
185-
"logs:PutLogEvents",
186-
"logs:CreateLogGroup",
187-
"logs:CreateLogStream",
188185
"ssm:DescribeParameters",
189186
"ec2:Describe*",
190187
"ec2:DescribeVpcs",
191-
"acm:ListCertificates",
188+
# API Gateway domain and deployment
189+
"apigateway:*",
190+
# ACM for certs
192191
"acm:DescribeCertificate",
193192
"acm:GetCertificate",
194-
"apigateway:*",
195-
"iam:PassRole",
193+
"acm:ListCertificates",
194+
# S3 for mTLS truststore
195+
"s3:GetObject",
196+
# CloudWatch Logs for logging
197+
"logs:CreateLogGroup",
198+
"logs:CreateLogStream",
199+
"logs:PutLogEvents",
200+
# IAM PassRole for logging role association (if needed)
201+
"iam:PassRole"
196202
],
197203
Resource = "*"
198204
#checkov:skip=CKV_AWS_289: Actions require wildcard resource
@@ -258,7 +264,7 @@ resource "aws_iam_policy" "api_infrastructure" {
258264
"arn:aws:ssm:${var.default_aws_region}:${data.aws_caller_identity.current.account_id}:parameter/${var.environment}/*",
259265
"arn:aws:acm:${var.default_aws_region}:${data.aws_caller_identity.current.account_id}:certificate/*",
260266
]
261-
}
267+
},
262268
]
263269
})
264270

0 commit comments

Comments
 (0)