← Back to Pull requests

fix(fluentbit): allow log-group actions on the bare log-group ARN #1177

Open
unknown opened this pull request with 251 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 31, 2026 03:20 UTC
Author

What does this PR do?

In infra/terraform/aws-for-fluentbit.tf, the CreateCWLogs statement of the Fluent Bit IRSA policy (logs:CreateLogGroup, logs:CreateLogStream, logs:DescribeLogGroups, logs:DescribeLogStreams, logs:PutRetentionPolicy) covers only

arn:<partition>:logs:<region>:<account>:log-group:<name>:*

This 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, DescribeLogGroups and PutRetentionPolicy are 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 / autoCreateGroup in helm-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 its aws_for_fluentbit policy.

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)

  • Mandatory for new blueprints. Yes, I have added a example to support my blueprint PR

  • Mandatory for new blueprints. Yes, I have updated the website/docs or website/blog section for this feature

  • Yes, I ran pre-commit run -a with this PR. Link for installing pre-commit locally
  • For Moderators

  • E2E Test successfully complete before merge?
  • Additional Notes

    I didn't deploy this to an AWS account. Testing was:

  • terraform fmt -check on the changed file: passes.

  • A scratch terraform test (not committed) that renders this policy document with stub values and asserts that the CreateCWLogs resources include the bare log-group ARN. It fails on main and passes with this change.
  • I used AI assistance to prepare this change. I reviewed and tested it myself.

    Diff: 251 lines (+188 / -63) across 3 files Reviewer: vara-bonthu Review duration: 43934m
    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
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39% (MEDIUM) · Higher = larger blast radius
    39%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.2% · Safe to merge
    22.2%