Skip to content

Commit eb8ef8e

Browse files
fix(cloudwatch-metrics-stream): remove unused permissions from cloud_monitoring_policy (#17)
1 parent 4ef0cc5 commit eb8ef8e

File tree

2 files changed

+0
-72
lines changed

2 files changed

+0
-72
lines changed

README.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,6 @@ Sysdig requires AWS IAM permissions to display the correct status and metadata f
2424
{
2525
"Version": "2012-10-17",
2626
"Statement": [
27-
{
28-
"Action": [
29-
"s3:ListBucket",
30-
"s3:GetObjectAttributes",
31-
"s3:GetObject"
32-
],
33-
"Effect": "Allow",
34-
"Resource": "arn:aws:s3:::sysdig-backup-bucket*"
35-
},
36-
{
37-
"Action": [
38-
"cloudwatch:ListMetricStreams",
39-
"cloudwatch:GetMetricStream"
40-
],
41-
"Effect": "Allow",
42-
"Resource": "arn:aws:cloudwatch:*:<AWS-accountID>:metric-stream/*"
43-
},
44-
{
45-
"Action": "firehose:DescribeDeliveryStream",
46-
"Effect": "Allow",
47-
"Resource": "arn:aws:firehose:*:<AWS-accountID>:deliverystream/*"
48-
},
4927
{
5028
"Action": [
5129
"cloudwatch:ListMetrics",
@@ -58,14 +36,6 @@ Sysdig requires AWS IAM permissions to display the correct status and metadata f
5836
"Action": "ec2:DescribeInstances",
5937
"Effect": "Allow",
6038
"Resource": "*"
61-
},
62-
{
63-
"Action": [
64-
"s3:ListBucket",
65-
"s3:ListAllMyBuckets"
66-
],
67-
"Effect": "Allow",
68-
"Resource": "*"
6939
}
7040
]
7141
}

modules/cloud-watch-metrics-stream/iam_data.tf

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -79,38 +79,6 @@ data "aws_iam_policy_document" "sysdig_cloudwatch_integration_monitoring_role_as
7979
}
8080

8181
data "aws_iam_policy_document" "iam_role_task_policy_cloud_monitoring_policy" {
82-
statement {
83-
effect = "Allow"
84-
actions = [
85-
"s3:ListBucket",
86-
"s3:GetObject",
87-
"s3:GetObjectAttributes"
88-
]
89-
resources = [
90-
"arn:${data.aws_partition.current.partition}:s3:::sysdig-backup-bucket*"
91-
]
92-
}
93-
94-
statement {
95-
effect = "Allow"
96-
actions = [
97-
"cloudwatch:GetMetricStream",
98-
"cloudwatch:ListMetricStreams"
99-
]
100-
resources = [
101-
"arn:${data.aws_partition.current.partition}:cloudwatch:*:${data.aws_caller_identity.me.account_id}:metric-stream/*"
102-
]
103-
}
104-
105-
statement {
106-
effect = "Allow"
107-
actions = [
108-
"firehose:DescribeDeliveryStream"
109-
]
110-
resources = [
111-
"arn:${data.aws_partition.current.partition}:firehose:*:${data.aws_caller_identity.me.account_id}:deliverystream/*"
112-
]
113-
}
11482

11583
statement {
11684
effect = "Allow"
@@ -133,14 +101,4 @@ data "aws_iam_policy_document" "iam_role_task_policy_cloud_monitoring_policy" {
133101
]
134102
}
135103

136-
statement {
137-
effect = "Allow"
138-
actions = [
139-
"s3:ListAllMyBuckets",
140-
"s3:ListBucket"
141-
]
142-
resources = [
143-
"*"
144-
]
145-
}
146104
}

0 commit comments

Comments
 (0)