Skip to content

Commit 08229ed

Browse files
Refactor IAM policy used by CI
1 parent fbbc758 commit 08229ed

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

hack/e2e/eksctl/cluster.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,10 @@ iam:
3131
attachPolicy:
3232
Version: '2012-10-17'
3333
Statement:
34-
- Effect: Allow
35-
Action:
36-
- ec2:CopyVolumes
37-
Resource: "arn:aws:ec2:*:*:volume/vol-*"
3834
- Effect: Allow
3935
Action:
4036
- ec2:CopyVolumes
4137
Resource: "arn:aws:ec2:*:*:volume/*"
42-
Condition:
43-
StringLike:
44-
"aws:RequestTag/ebs.csi.aws.com/cluster": "true"
45-
- Effect: Allow
46-
Action:
47-
- ec2:CopyVolumes
48-
Resource: "arn:aws:ec2:*:*:volume/*"
49-
Condition:
50-
StringLike:
51-
"aws:RequestTag/CSIVolumeName": "*"
5238
- Effect: Allow
5339
Action:
5440
- ec2:CreateTags

hack/e2e/kops/patch-cluster.yaml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,10 @@ spec:
4444
"Effect": "Allow",
4545
"Action": [
4646
"ec2:CreateSnapshot",
47-
"ec2:ModifyVolume"
48-
],
49-
"Resource": "arn:aws:ec2:*:*:volume/*"
50-
},
51-
{
52-
"Effect": "Allow",
53-
"Action": [
47+
"ec2:ModifyVolume",
5448
"ec2:CopyVolumes"
5549
],
56-
"Resource": [
57-
"arn:aws:ec2:*:*:volume/vol-*"
58-
]
50+
"Resource": "arn:aws:ec2:*:*:volume/*"
5951
},
6052
{
6153
"Effect": "Allow",
@@ -108,8 +100,7 @@ spec:
108100
{
109101
"Effect": "Allow",
110102
"Action": [
111-
"ec2:CreateVolume",
112-
"ec2:CopyVolumes"
103+
"ec2:CreateVolume"
113104
],
114105
"Resource": "arn:aws:ec2:*:*:volume/*",
115106
"Condition": {

0 commit comments

Comments
 (0)