Skip to content

Commit 4ec0d54

Browse files
authored
feat: Add support to ebs-csi policy for volume clones (#45)
1 parent 84ec157 commit 4ec0d54

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

aws_ebs_csi.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ data "aws_iam_policy_document" "ebs_csi" {
2828
resources = ["*"]
2929
}
3030

31+
statement {
32+
actions = ["ec2:CopyVolumes"]
33+
resources = ["arn:${local.partition}:ec2:*:*:volume/vol-*"]
34+
}
35+
3136
statement {
3237
actions = ["ec2:CreateTags"]
3338

@@ -42,6 +47,7 @@ data "aws_iam_policy_document" "ebs_csi" {
4247
values = [
4348
"CreateVolume",
4449
"CreateSnapshot",
50+
"CopyVolumes",
4551
]
4652
}
4753
}
@@ -56,7 +62,10 @@ data "aws_iam_policy_document" "ebs_csi" {
5662
}
5763

5864
statement {
59-
actions = ["ec2:CreateVolume"]
65+
actions = [
66+
"ec2:CreateVolume",
67+
"ec2:CopyVolumes",
68+
]
6069
resources = ["arn:${local.partition}:ec2:*:*:volume/*"]
6170

6271
condition {
@@ -67,7 +76,10 @@ data "aws_iam_policy_document" "ebs_csi" {
6776
}
6877

6978
statement {
70-
actions = ["ec2:CreateVolume"]
79+
actions = [
80+
"ec2:CreateVolume",
81+
"ec2:CopyVolumes",
82+
]
7183
resources = ["arn:${local.partition}:ec2:*:*:volume/*"]
7284

7385
condition {

0 commit comments

Comments
 (0)