-
Notifications
You must be signed in to change notification settings - Fork 3
/
restricted-policy-2.json5
195 lines (195 loc) · 6.46 KB
/
restricted-policy-2.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "cloudformation",
"Effect": "Allow",
"Action": [
"acm:AddTagsToCertificate",
"acm:DescribeCertificate",
"acm:RequestCertificate",
"autoscaling:DescribeScalingActivities",
"ec2:CreateLaunchTemplate",
"ec2:CreatePlacementGroup",
"ec2:CreateSecurityGroup",
"ec2:DescribeAccountAttributes",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeLaunchTemplates",
"ec2:DescribeLaunchTemplateVersions",
"ec2:DescribePlacementGroups",
"ec2:DescribeSecurityGroups",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RunInstances",
"ec2:DeleteLaunchTemplate",
"ec2:DeletePlacementGroup",
"elasticfilesystem:DescribeMountTargets",
"elasticfilesystem:DescribeFileSystems",
"rds:DescribeEngineDefaultParameters"
],
"Resource": "*",
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "CFResourceTag",
"Resource": "*",
"Effect": "Allow",
"Action": [
"ec2:AuthorizeSecurityGroupEgress",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"autoscaling:DeleteAutoScalingGroup",
"ec2:DeleteSecurityGroup",
"eks:DeleteCluster"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
},
"StringLike": {
"aws:ResourceTag/Cloudera-Resource-Name": "crn:cdp:*"
}
}
},
{
"Sid": "CFRequestTag",
"Resource": "*",
"Effect": "Allow",
"Action": [
"kms:TagResource",
"logs:CreateLogGroup"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
},
"StringLike": {
"aws:RequestTag/Cloudera-Resource-Name": "crn:cdp:*"
}
}
},
{
"Sid": "CFDatabase",
"Resource": [
"arn:aws:rds:*:*:db:env-*-dwx-stack-rds",
"arn:aws:rds:*:*:subgrp:env-*-dwx-stack-dbsubnetgroup-*",
"arn:aws:rds:*:*:pg:env-*-dwx-stack-rds-parameter-group"
],
"Effect": "Allow",
"Action": [
"rds:CreateDBInstance",
"rds:CreateDBSubnetGroup",
"rds:DescribeDBSubnetGroups",
"rds:ListTagsForResource",
"rds:CreateDBParameterGroup",
"rds:DeleteDBParameterGroup",
"rds:ModifyDBParameterGroup",
"rds:DescribeDBParameterGroups"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "CFEksCluster",
"Resource": "arn:aws:eks:*:*:cluster/env-*-dwx-stack-eks",
"Effect": "Allow",
"Action": [
"eks:CreateCluster",
"eks:DescribeCluster"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "CFCloudwatch",
"Resource": "arn:aws:eks:*::log-group:/aws/eks/env-*-dwx-stack-eks/cluster:*",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:DescribeLogStreams",
"logs:PutLogEvents",
"logs:PutRetentionPolicy"
]
},
{
"Sid": "CFKeys",
"Resource": "*",
"Effect": "Allow",
"Action": [
"kms:CreateAlias",
"kms:DeleteAlias",
"kms:DescribeKey",
"kms:EnableKeyRotation",
"kms:GenerateDataKey",
"kms:GenerateDataKeyWithoutPlaintext",
"kms:ScheduleKeyDeletion"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "CFFileSystem",
"Resource": "*",
"Effect": "Allow",
"Action": [
"elasticfilesystem:CreateMountTarget",
"elasticfilesystem:DeleteFileSystem",
"elasticfilesystem:DeleteMountTarget"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
},
"StringLike": {
"aws:ResourceTag/clusterId": "env-*"
}
}
},
{
"Sid": "AllowSsmParams",
"Effect": "Allow",
"Action": [
"ssm:DescribeParameters",
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:GetParameterHistory",
"ssm:GetParametersByPath"
],
"Resource": [
"arn:aws:ssm:*:*:parameter/aws/service/eks/optimized-ami/*"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "TagRoleRestriction",
"Effect": "Allow",
"Action": [
"iam:TagRole"
],
"Resource": "*",
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
}
]
}