Skip to content

Commit

Permalink
Update detected
Browse files Browse the repository at this point in the history
  • Loading branch information
MAMIP Bot committed Nov 1, 2024
1 parent 2c22bdd commit 97a0294
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions policies/AmazonEKSComputePolicy
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"PolicyVersion": {
"CreateDate": "2024-11-01T21:46:52Z",
"VersionId": "v1",
"Document": {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ec2:CreateFleet",
"ec2:RunInstances"
],
"Resource": [
"arn:aws:ec2:*::image/*",
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:subnet/*"
],
"Effect": "Allow"
},
{
"Action": [
"ec2:CreateFleet",
"ec2:RunInstances"
],
"Resource": "arn:aws:ec2:*:*:launch-template/*",
"Effect": "Allow",
"Condition": {
"StringEquals": {
"aws:ResourceTag/eks:eks-cluster-name": "${aws:PrincipalTag/eks:eks-cluster-name}"
}
}
},
{
"Action": [
"ec2:CreateFleet",
"ec2:RunInstances",
"ec2:CreateLaunchTemplate"
],
"Resource": "*",
"Effect": "Allow",
"Condition": {
"StringLike": {
"aws:RequestTag/eks:kubernetes-node-class-name": "*",
"aws:RequestTag/eks:kubernetes-node-pool-name": "*"
},
"ForAllValues:StringLike": {
"aws:TagKeys": [
"eks:eks-cluster-name",
"eks:kubernetes-node-class-name",
"eks:kubernetes-node-pool-name",
"kubernetes.io/cluster/*"
]
},
"StringEquals": {
"aws:RequestTag/eks:eks-cluster-name": "${aws:PrincipalTag/eks:eks-cluster-name}"
}
}
},
{
"Action": "ec2:CreateTags",
"Resource": "*",
"Effect": "Allow",
"Condition": {
"StringEquals": {
"ec2:CreateAction": [
"CreateFleet",
"RunInstances",
"CreateLaunchTemplate"
]
}
}
},
{
"Action": "iam:AddRoleToInstanceProfile",
"Resource": "arn:aws:iam::*:instance-profile/eks-compute-*",
"Effect": "Allow"
},
{
"Action": "iam:PassRole",
"Resource": "*",
"Effect": "Allow",
"Condition": {
"StringEquals": {
"iam:PassedToService": [
"ec2.amazonaws.com",
"ec2.amazonaws.com.cn"
]
}
}
}
]
},
"IsDefaultVersion": true
}
}

0 comments on commit 97a0294

Please sign in to comment.