File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
modules/runner-binaries-syncer Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,13 @@ resource "aws_s3_bucket_notification" "on_deploy" {
123
123
depends_on = [aws_lambda_permission . on_deploy ]
124
124
}
125
125
126
+ data "aws_caller_identity" "current" {}
127
+
126
128
resource "aws_lambda_permission" "on_deploy" {
127
- statement_id = " AllowExecutionFromS3Bucket"
128
- action = " lambda:InvokeFunction"
129
- function_name = aws_lambda_function. syncer . arn
130
- principal = " s3.amazonaws.com"
131
- source_arn = aws_s3_bucket. action_dist . arn
129
+ statement_id = " AllowExecutionFromS3Bucket"
130
+ action = " lambda:InvokeFunction"
131
+ function_name = aws_lambda_function. syncer . arn
132
+ principal = " s3.amazonaws.com"
133
+ source_account = data. aws_caller_identity . current . account_id
134
+ source_arn = aws_s3_bucket. action_dist . arn
132
135
}
You can’t perform that action at this time.
0 commit comments