Skip to content

Commit 0381fe8

Browse files
[PRMT-862] fixed sonar issues
1 parent f7a5d1e commit 0381fe8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

infrastructure/policies.tf

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,25 @@ resource "aws_iam_policy" "transfer_kill_switch" {
7272
name = "${terraform.workspace}-transfer-kill-switch"
7373
description = "Permissions for Transfer kill switch Lambda"
7474
policy = jsonencode({
75-
Version = "2012-10-17"
75+
Version = "2012-10-17",
7676
Statement = [
7777
{
78-
Effect = "Allow"
78+
Sid = "DescribeAndStopTransferServers",
79+
Effect = "Allow",
7980
Action = [
80-
"transfer:ListServers",
8181
"transfer:DescribeServer",
8282
"transfer:StopServer",
83+
],
84+
Resource = [
85+
"arn:aws:transfer:${var.region}:${data.aws_caller_identity.current.account_id}:server/*",
8386
]
87+
},
88+
{
89+
Sid = "ListTransferServers",
90+
Effect = "Allow",
91+
Action = [
92+
"transfer:ListServers",
93+
],
8494
Resource = "*"
8595
}
8696
]

0 commit comments

Comments
 (0)