Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations 🇺🇦
│ Error: External Program Execution Failed
│
│ with module.lambda["swat-terra-create-function-pks"].data.external.archive_prepare[0],
│ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare":
│ 10: program = [local.python, "${path.module}/package.py", "prepare"]
│
│ The data source received an unexpected error while attempting to execute
│ the program.
│
│ Program: /usr/bin/python3
│ Error Message: Could not locate source_path "null". Paths are relative to
│ directory where terraform plan is being run
│ ("/builds/swisscom/servicenow/iaws_iac/swisscom-terraform/perm-infra/modules/lambda")
│
│ State: exit status 1
╵
╷
│ Error: External Program Execution Failed
│
│ with module.lambda["swat-terra-create-test-function-pks"].data.external.archive_prepare[0],
│ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare":
│ 10: program = [local.python, "${path.module}/package.py", "prepare"]
│
│ The data source received an unexpected error while attempting to execute
│ the program.
│
│ Program: /usr/bin/python3
│ Error Message: Could not locate source_path "null". Paths are relative to
│ directory where terraform plan is being run
│ ("/builds/swisscom/servicenow/iaws_iac/swisscom-terraform/perm-infra/modules/lambda")
│
│ State: exit status 1
╵
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: command terminated with exit code 1
Terminal Output Screenshot(s)
│ Error: External Program Execution Failed
│
│ with module.lambda["swat-terra-create-function-pks"].data.external.archive_prepare[0],
│ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare":
│ 10: program = [local.python, "${path.module}/package.py", "prepare"]
│
│ The data source received an unexpected error while attempting to execute
│ the program.
│
│ Program: /usr/bin/python3
│ Error Message: Could not locate source_path "null". Paths are relative to
│ directory where terraform plan is being run
│ ("/builds/example/example/iaws_iac/example-terraform/perm-infra/modules/lambda")
│
│ State: exit status 1
╵
╷
│ Error: External Program Execution Failed
│
│ with module.lambda["swat-terra-create-test-function-pks"].data.external.archive_prepare[0],
│ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare":
│ 10: program = [local.python, "${path.module}/package.py", "prepare"]
│
│ The data source received an unexpected error while attempting to execute
│ the program.
│
│ Program: /usr/bin/python3
│ Error Message: Could not locate source_path "null". Paths are relative to
│ directory where terraform plan is being run
│ ("/builds/example/example/iaws_iac/example-terraform/perm-infra/modules/lambda")
│
│ State: exit status 1
╵
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: command terminated with exit code 1
Versions
Module version [Required]:
Terraform version: 7.15.0
Provider version(s): 5.70.0
Expected behavior
module "lambda" { for_each = var.lambda_configs
source = "terraform-aws-modules/lambda/aws" version = "7.14.0"
function_name = each.key package_type = "Image" image_uri = local.image_uris[each.key]
memory_size = each.value.memory_size timeout = each.value.timeout
Automatically create IAM role for Lambda function
role_name = data.aws_iam_role.lambda_exec_role.name
}
Actual behavior
│ Error: External Program Execution Failed │ │ with module.lambda["swat-terra-create-function-pks"].data.external.archive_prepare[0], │ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare": │ 10: program = [local.python, "${path.module}/package.py", "prepare"] │ │ The data source received an unexpected error while attempting to execute │ the program. │ │ Program: /usr/bin/python3 │ Error Message: Could not locate source_path "null". Paths are relative to │ directory where
terraform plan
is being run │ ("/builds/swisscom/servicenow/iaws_iac/swisscom-terraform/perm-infra/modules/lambda") │ │ State: exit status 1 ╵ ╷ │ Error: External Program Execution Failed │ │ with module.lambda["swat-terra-create-test-function-pks"].data.external.archive_prepare[0], │ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare": │ 10: program = [local.python, "${path.module}/package.py", "prepare"] │ │ The data source received an unexpected error while attempting to execute │ the program. │ │ Program: /usr/bin/python3 │ Error Message: Could not locate source_path "null". Paths are relative to │ directory whereterraform plan
is being run │ ("/builds/swisscom/servicenow/iaws_iac/swisscom-terraform/perm-infra/modules/lambda") │ │ State: exit status 1 ╵ Cleaning up project directory and file based variables 00:01 ERROR: Job failed: command terminated with exit code 1Terminal Output Screenshot(s)
│ Error: External Program Execution Failed │ │ with module.lambda["swat-terra-create-function-pks"].data.external.archive_prepare[0], │ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare": │ 10: program = [local.python, "${path.module}/package.py", "prepare"] │ │ The data source received an unexpected error while attempting to execute │ the program. │ │ Program: /usr/bin/python3 │ Error Message: Could not locate source_path "null". Paths are relative to │ directory where
terraform plan
is being run │ ("/builds/example/example/iaws_iac/example-terraform/perm-infra/modules/lambda") │ │ State: exit status 1 ╵ ╷ │ Error: External Program Execution Failed │ │ with module.lambda["swat-terra-create-test-function-pks"].data.external.archive_prepare[0], │ on .terraform/modules/lambda/package.tf line 10, in data "external" "archive_prepare": │ 10: program = [local.python, "${path.module}/package.py", "prepare"] │ │ The data source received an unexpected error while attempting to execute │ the program. │ │ Program: /usr/bin/python3 │ Error Message: Could not locate source_path "null". Paths are relative to │ directory whereterraform plan
is being run │ ("/builds/example/example/iaws_iac/example-terraform/perm-infra/modules/lambda") │ │ State: exit status 1 ╵ Cleaning up project directory and file based variables 00:01 ERROR: Job failed: command terminated with exit code 1Additional context