Skip to content

Commit bf41d93

Browse files
authored
PLT-1605 : Codebuild permissions required for issuing new codebuild projects (#405)
## 🎫 Ticket https://jira.cms.gov/browse/... ## 🛠 Changes <!-- What was added, updated, or removed in this PR? --> ## ℹ️ Context <!-- Why were these changes made? Add background context suitable for a non-technical audience. --> These changes are made to support the establishment and management of new codebuild projects. <!-- If any of the following security implications apply, this PR must not be merged without Stephen Walter's approval. Explain in this section and add @SJWalter11 as a reviewer. - Adds a new software dependency or dependencies. - Modifies or invalidates one or more of our security controls. - Stores or transmits data that was not stored or transmitted before. - Requires additional review of security implications for other reasons. --> ## 🧪 Validation This will be validated upon merge and running tofu apply with the github actions role. <!-- How were the changes verified? Did you fully test the acceptance criteria in the ticket? Provide reproducible testing instructions and screenshots if applicable. --> Tofu plan for cdap test <details> # aws_iam_role_policy.github_actions_role_policy will be updated in-place ~ resource "aws_iam_role_policy" "github_actions_role_policy" { id = "cdap-test-github-actions:terraform-##" name = "terraform-###" ~ policy = jsonencode( ~ { ~ Statement = [ # (2 unchanged elements hidden) { Action = [ "backup:GetBackupSelection", "backup:GetBackupPlan", "backup:DescribeBackupVault", "backup:CreateBackupSelection", "backup:CreateBackupPlan", ] Effect = "Allow" Resource = "*" }, + { + Action = [ + "codebuild:UpdateWebhook", + "codebuild:UpdateProject", + "codebuild:ListProjects", + "codebuild:DeleteWebhook", + "codebuild:DeleteProject", + "codebuild:CreateWebhook", + "codebuild:CreateInvalidation", ] + Effect = "Allow" + Resource = "*" }, { Action = [ "cloudfront:ListDistributions", "cloudfront:GetResponseHeadersPolicy", "cloudfront:GetOriginAccessControl", "cloudfront:CreateInvalidation", ] Effect = "Allow" Resource = "*" }, # (23 unchanged elements hidden) ] # (1 unchanged attribute hidden) } ) # (2 unchanged attributes hidden) } </details>
1 parent d4c1f6a commit bf41d93

File tree

1 file changed

+13
-0
lines changed
  • terraform/services/github-actions-role

1 file changed

+13
-0
lines changed

terraform/services/github-actions-role/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,19 @@ data "aws_iam_policy_document" "github_actions_policy" {
131131
]
132132
resources = ["*"]
133133
}
134+
# Codebuild
135+
statement {
136+
actions = [
137+
"codebuild:CreateInvalidation",
138+
"codebuild:CreateWebhook",
139+
"codebuild:DeleteProject",
140+
"codebuild:DeleteWebhook",
141+
"codebuild:ListProjects",
142+
"codebuild:UpdateProject",
143+
"codebuild:UpdateWebhook"
144+
]
145+
resources = ["*"]
146+
}
134147
# CloudFront
135148
statement {
136149
actions = [

0 commit comments

Comments
 (0)