Skip to content

Commit 7dbedac

Browse files
committed
Fix CI tofu permissions for pr-intent public bucket
Grant CI user bucket-management read/write actions (GetBucket*/PutBucket*) on the public PR-intent bucket so fleet deploy can run tofu apply without AccessDenied.
1 parent 833264b commit 7dbedac

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

infra/opentofu/aws/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ data "aws_iam_policy_document" "ami_importer" {
134134
resources = [aws_s3_bucket.image_bucket.arn]
135135
}
136136

137+
# Needed so CI can manage the public PR-intent bucket (read/update bucket policy,
138+
# public access block, versioning, encryption, etc.) during tofu apply.
139+
statement {
140+
sid = "PrIntentBucketManage"
141+
actions = [
142+
"s3:GetBucket*",
143+
"s3:PutBucket*",
144+
"s3:DeleteBucketPolicy",
145+
"s3:ListBucket"
146+
]
147+
resources = [aws_s3_bucket.pr_intent_public.arn]
148+
}
149+
137150
statement {
138151
sid = "ObjectReadWrite"
139152
actions = [

0 commit comments

Comments
 (0)