File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed
Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -72,23 +72,34 @@ 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 {
87- Effect = " Allow"
97+ Sid = " PublishTransferKillSwitchMetrics" ,
98+ Effect = " Allow" ,
8899 Action = [
89100 " cloudwatch:PutMetricData" ,
90- ]
91- Resource = " *"
101+ ],
102+ Resource = " *" ,
92103 Condition = {
93104 StringEquals = {
94105 " cloudwatch:namespace" = " Custom/TransferKillSwitch"
@@ -97,4 +108,4 @@ resource "aws_iam_policy" "transfer_kill_switch" {
97108 }
98109 ]
99110 })
100- }
111+ }
You can’t perform that action at this time.
0 commit comments