terraform-aws-modules / terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/lambda/aws
Apache License 2.0
885 stars 658 forks source link

Zip command ignores the "source" parameter #581

Open gp42 opened 3 weeks ago

gp42 commented 3 weeks ago

Description

Starting with version v7.2.6 ":zip" ignores the source parameter.

This works as expected on version v7.2.5 - lambda only contains files from the build folder in function root /. Starting with v7.2.6 this is not the case anymore, and all files from the path are added to the package.

Versions

Reproduction Code [Required]

...
  build_in_docker = false
  source_path = [
    {
      path = "${path.module}/files/lambda"
      commands = [
        ":zip build /"
      ],
    }
  ]

Steps to reproduce the behavior:

Use :zip command with source and destination parameters to copy files from subdirectory.

Expected behavior

Function package only contains Files from source directory in destination.

Actual behavior

All files from path are present in function package.

Additional context

Bug introduced in v7.2.6