-
Notifications
You must be signed in to change notification settings - Fork 3
/
restricted-policy-managedARN-1.json5
179 lines (179 loc) · 6.08 KB
/
restricted-policy-managedARN-1.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
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ResourceTag",
"Effect": "Allow",
"Action": [
"acm:DeleteCertificate",
"autoscaling:SuspendProcesses",
"autoscaling:UpdateAutoScalingGroup",
"cloudformation:DeleteStack",
"cloudformation:DescribeStackEvents",
"elasticfilesystem:PutFileSystemPolicy",
"rds:DeleteDBInstance",
"rds:DeleteDBSecurityGroup",
"rds:DeleteDBSubnetGroup",
"ec2:DeleteKeypair"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:ResourceTag/Cloudera-Resource-Name": "crn:cdp:*"
}
}
},
{
"Sid": "RequestTag",
"Effect": "Allow",
"Action": [
"autoscaling:CreateAutoScalingGroup",
"cloudformation:CreateStack",
"eks:TagResource",
"elasticfilesystem:CreateFileSystem",
"kms:CreateGrant",
"kms:CreateKey",
"rds:AddTagsToResource",
"cloudformation:UpdateStack"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:RequestTag/Cloudera-Resource-Name": "crn:cdp:*"
}
}
},
{
"Sid": "AttachRole",
"Effect": "Allow",
"Action": "iam:AttachRolePolicy",
"Resource": [
"arn:aws:iam::*:role/env-*-dwx-stack-EKSServiceRole-*",
"arn:aws:iam::*:role/env-*-dwx-stack-NodeInstanceRole-*"
],
"Condition": {
"ForAnyValue:ArnEqualsIfExists": {
"iam:PolicyARN": [
"arn:aws:iam::aws:policy/AmazonEKSClusterPolicy",
"arn:aws:iam::aws:policy/AmazonEKSServicePolicy",
"arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
"arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
"arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
"arn:aws:iam::aws:policy/CloudWatchAgentAdminPolicy",
"arn:aws:iam::${AWS_ACCOUNT}:policy/${NODEROLE_INLINE_POLICY}"
]
}
}
},
{
"Sid": "Role",
"Effect": "Allow",
"Action": [
"iam:AddRoleToInstanceProfile",
"iam:CreateInstanceProfile",
"iam:CreateRole",
"iam:DeleteInstanceProfile",
"iam:DeleteRole",
"iam:DeleteRolePolicy",
"iam:DetachRolePolicy",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:PassRole",
"iam:RemoveRoleFromInstanceProfile"
],
"Resource": [
"arn:aws:iam::*:instance-profile/env-*-dwx-stack-NodeInstanceProfile-*",
"arn:aws:iam::*:role/env-*-dwx-stack-EKSServiceRole-*",
"arn:aws:iam::*:role/env-*-dwx-stack-NodeInstanceRole-*"
]
},
{
"Sid": "gocode",
"Effect": "Allow",
"Action": [
"acm:DescribeCertificate",
"acm:ListCertificates",
"ec2:DescribeKeyPairs",
"ec2:DescribeDhcpOptions",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs",
"autoscaling:DescribeAutoScalingGroups",
"iam:SimulatePrincipalPolicy",
"iam:ListAttachedRolePolicies",
"ec2:DescribeVpcAttribute",
"ec2:DescribeImages",
"ec2:CreateTags",
"ec2:DeleteTags",
"ec2:CreateKeyPair",
"ec2:DescribeInstanceTypes"
],
"Resource": "*"
},
{
"Sid": "gocodeStack",
"Effect": "Allow",
"Action": [
"cloudformation:DescribeStacks"
],
"Resource": "arn:aws:cloudformation:*:*:stack/env-*-dwx-stack/*"
},
{
"Sid": "gocodeEKSCluster",
"Effect": "Allow",
"Action": [
"eks:UpdateClusterConfig",
"eks:UpdateClusterVersion",
"eks:DescribeUpdate"
],
"Resource": "arn:aws:eks:*:*:cluster/env-*-dwx-stack-eks"
},
{
"Sid": "S3full",
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
],
"Resource": "*"
},
{
"Sid": "S3PutGetObject",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::${DATALAKE_BUCKET}/cf-templates/*",
"arn:aws:s3:::${DATALAKE_BUCKET}/backup/*"
]
},
{
"Sid": "UpgradeCfStack",
"Effect": "Allow",
"Action": [
"cloudformation:GetTemplate",
"cloudformation:GetTemplateSummary",
"eks:ListUpdates",
"ec2:CreateLaunchTemplateVersion",
"autoscaling:TerminateInstanceInAutoScalingGroup",
"autoscaling:DescribeScheduledActions",
"autoscaling:SetDesiredCapacity",
"ec2:DescribeInstances"
],
"Resource": "*"
},
{
"Sid": "StartStopRDS",
"Effect": "Allow",
"Action": [
"rds:StartDBInstance",
"rds:StopDBInstance",
"rds:DescribeDBInstances"
],
"Resource": [
"arn:aws:rds:*:*:db:env-*-dwx-stack-rds",
"arn:aws:rds:*:*:subgrp:env-*-dwx-stack-dbsubnetgroup-*"
]
}
]
}