fix(fluentbit): allow log-group actions on the bare log-group ARN #1177
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.39) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 251 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.331
Real PR Conversation Timeline
1 comments
"Review active on #1177"
general
weight: 0.35
vara-bonthu
What does this PR do?
In
infra/terraform/aws-for-fluentbit.tf, theCreateCWLogsstatement of the Fluent Bit IRSA policy (logs:CreateLogGroup,logs:CreateLogStream,logs:DescribeLogGroups,logs:DescribeLogStreams,logs:PutRetentionPolicy) covers onlyThis PR adds the bare log-group ARN (
...:log-group:<name>) next to it. It's a one-line change.Motivation
CloudWatch Logs is moving to resource-level authorization for log-group actions. Log-group level actions such as
CreateLogGroup,DescribeLogGroupsandPutRetentionPolicyare then checked against the log-group ARN without the trailing:*, and the current statement doesn't match that ARN. If a stack enables the CloudWatch output (cloudWatchLogs.enabled/autoCreateGroupinhelm-values/aws-for-fluentbit.yaml), Fluent Bit would get AccessDenied once enforcement starts. The same fix was made upstream in aws-ia/terraform-aws-eks-blueprints-addons#523 for itsaws_for_fluentbitpolicy.More
website/docsorwebsite/blogsection for this featurepre-commit run -awith this PR. Link for installing pre-commit locallyFor Moderators
Additional Notes
I didn't deploy this to an AWS account. Testing was:
terraform fmt -checkon the changed file: passes.terraform test(not committed) that renders this policy document with stub values and asserts that theCreateCWLogsresources include the bare log-group ARN. It fails onmainand passes with this change.I used AI assistance to prepare this change. I reviewed and tested it myself.