Skip to content

Commit bb2ab27

Browse files
Grant prune-buildcache role access to spack-binaries-prs bucket (#1435)
This fixes AccessDenied errors we were seeing in the prune-buildcache-v3 CronJob when attempting to s3:DeleteObject against the spack-binaries-prs bucket. This was caused by the fact that the relevant IAM policy only granted this action on the develop/* prefix of the protected mirror. Resolve this error by adding ListBucket and DeleteObject on the PR binary mirror bucket to this policy.
1 parent 697f6c8 commit bb2ab27

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

terraform/modules/spack_aws_k8s/iam_service_accounts.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ module "build_cache_pruner" {
1515
"s3:DeleteObject"
1616
],
1717
"Resource" : "${module.protected_binary_mirror.bucket_arn}/develop/*"
18+
},
19+
{
20+
"Effect" : "Allow",
21+
"Action" : "s3:ListBucket",
22+
"Resource" : module.pr_binary_mirror.bucket_arn
23+
},
24+
{
25+
"Effect" : "Allow",
26+
"Action" : "s3:DeleteObject",
27+
"Resource" : "${module.pr_binary_mirror.bucket_arn}/*"
1828
}
1929
]
2030
}),

0 commit comments

Comments
 (0)