File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -219,12 +219,6 @@ resource "aws_iam_role_policy_attachment" "lambda_policy_attach" {
219
219
role = aws_iam_role. iam_for_lambda . name
220
220
}
221
221
222
- data "archive_file" "cleanup_lambda_zip" {
223
- source_dir = var. lambda_src_dir
224
- output_path = " lambda_function_payload.zip"
225
- type = " zip"
226
- }
227
-
228
222
# TODO: the SG fails to destroy because the lambda's ENI is still using it.
229
223
resource "aws_security_group" "lambda_sg" {
230
224
name = " ${ local . long_name } -lambda-sg"
@@ -243,8 +237,7 @@ resource "aws_security_group" "lambda_sg" {
243
237
}
244
238
245
239
resource "aws_lambda_function" "api_lambda" {
246
- filename = data. archive_file . cleanup_lambda_zip . output_path
247
- source_code_hash = data. archive_file . cleanup_lambda_zip . output_base64sha256
240
+ filename = var. lambda_zip_file
248
241
function_name = local. long_name
249
242
role = aws_iam_role. iam_for_lambda . arn
250
243
handler = var. handler
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ variable "codedeploy_service_role_arn" {
13
13
description = " ARN of the IAM Role for the CodeDeploy to use to initiate new deployments. (usually the PowerBuilder Role)"
14
14
}
15
15
16
- variable "lambda_src_dir " {
16
+ variable "lambda_zip_file " {
17
17
type = string
18
- description = " Directory that contains your lambda source code"
18
+ description = " File that contains your compiled or zipped source code. "
19
19
}
20
20
21
21
variable "handler" {
You can’t perform that action at this time.
0 commit comments