Skip to content

Commit

Permalink
Add cloudwatch logs permissions to read-only access via github
Browse files Browse the repository at this point in the history
  • Loading branch information
poornima-krishnasamy committed May 3, 2023
1 parent feffd88 commit 42f2279
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ data "aws_iam_policy_document" "cloudwatch_for_github" {
actions = [
"cloudwatch:ListMetric*",
"cloudwatch:GetMetric*",
"cloudwatch:ListDashboards"
"cloudwatch:ListDashboards",
"logs:DescribeLogGroups",
]
resources = ["*"]
}
Expand All @@ -14,7 +15,28 @@ data "aws_iam_policy_document" "cloudwatch_for_github" {
sid = "AllowCloudwatchViewOwn"
effect = "Allow"
actions = [
"cloudwatch:GetDashboard"
"cloudwatch:GetDashboard",
"logs:ListTagsLogGroup",
"logs:DescribeQueries",
"logs:GetLogRecord",
"logs:DescribeLogGroups",
"logs:DescribeLogStreams",
"logs:DescribeSubscriptionFilters",
"logs:StartQuery",
"logs:DescribeMetricFilters",
"logs:StopQuery",
"logs:TestMetricFilter",
"logs:GetLogDelivery",
"logs:ListTagsForResource",
"logs:ListLogDeliveries",
"logs:DescribeExportTasks",
"logs:GetQueryResults",
"logs:GetLogEvents",
"logs:FilterLogEvents",
"logs:DescribeQueryDefinitions",
"logs:GetLogGroupFields",
"logs:DescribeResourcePolicies",
"logs:DescribeDestinations"
]
resources = ["*"]
condition {
Expand Down

0 comments on commit 42f2279

Please sign in to comment.