Imported LogGroups don't have :*
in resource ARN grants
#7096
Labels
@aws-cdk/aws-logs
Related to Amazon CloudWatch Logs
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
p1
❓ General Issue
Feedback around
LogGroupBase:grant
The Question
Right now, there seems to be an assumption that the LogGroupArn is always appended with
:*
- I think this is true when the value is retrieved from GetAtt.aws-cdk/packages/@aws-cdk/aws-logs/lib/log-group.ts
Line 163 in cf8c831
But when customers construct the LogGroup themselves with fromLogGroupArn or fromLogGroupName then they would probably exclude the
:*
suffix.I think this ends up being confusing when a policy is created through grant when passed one of these constructed log groups - since the generated policy won't have permissions to create streams.
When using
fromLogGroupArn
orfromLogGroupName
the generated policy looks like:But it should look like:
Environment
Other information
This is related to one of the comments in this thread: #5954
THANK YOU!
The text was updated successfully, but these errors were encountered: