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

feat: Support passing extra args to poetry export #584

Closed morganchorlton3 closed 2 weeks ago

morganchorlton3 commented 2 weeks ago

Description

I have added support to pass additional poetry arguments into the source paths

{
      path                 = "../pyproject.toml"
      poetry_install   = true
      additional_poetry_args= ["--with", "dev", ...]
}

closes #500

Motivation and Context

I have a project with a mono-repo approach with multiple lambda functions in the project, I have some separate list of dependencies defined in my pyproject.toml. I want to install additional dependencies for certain lambda functions for example

Lambda function 1 deps: ...

Lambda function 2 deps: ....

Common function deps: ....

I could then install the common deps for all lambda functions and then install specific deps for each lambda functions.

Breaking Changes

None that i am aware off

How Has This Been Tested?

I am happy to do additional testing if required.

1

pdecat commented 2 weeks ago

How about simplifying things a bit, and just accept a poetry_args string that's directly added to the poetry command?

morganchorlton3 commented 2 weeks ago

Hi @pdecat yeah I can make that change

morganchorlton3 commented 2 weeks ago

How about simplifying things a bit, and just accept a poetry_args string that's directly added to the poetry command?

Change applied 👍

pdecat commented 2 weeks ago

PR should be renamed, e.g. feat: Support passing extra args to poetry export.

antonbabenko commented 2 weeks ago

This PR is included in version 7.6.0 :tada: