From 3cc6fc000994ac9662889f5f883c6e782dffa857 Mon Sep 17 00:00:00 2001 From: Omer Demirok Date: Tue, 23 Sep 2025 22:59:59 +0100 Subject: [PATCH] fix: use null_resource to create Lambda ZIP file before Lambda function creation --- modules/scenarios/message-size-breach/data_sources.tf | 2 +- modules/scenarios/message-size-breach/main.tf | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/scenarios/message-size-breach/data_sources.tf b/modules/scenarios/message-size-breach/data_sources.tf index b083a05..a02cb56 100644 --- a/modules/scenarios/message-size-breach/data_sources.tf +++ b/modules/scenarios/message-size-breach/data_sources.tf @@ -1,4 +1,4 @@ -# Data source for Lambda function zip file (inline code) +# Create Lambda function zip file using archive_file data source data "archive_file" "lambda_zip" { type = "zip" output_path = "${path.module}/lambda_function.zip" diff --git a/modules/scenarios/message-size-breach/main.tf b/modules/scenarios/message-size-breach/main.tf index 0fa26cb..6b6655c 100644 --- a/modules/scenarios/message-size-breach/main.tf +++ b/modules/scenarios/message-size-breach/main.tf @@ -53,7 +53,6 @@ resource "aws_lambda_function" "image_processor" { memory_size = 1024 depends_on = [ - data.archive_file.lambda_zip, aws_iam_role.lambda_role ]