Support terraform source_paths as list of dicts - #4506
Conversation
|
Thanks for the PR, could you showcase an example and also look at adding integration tests? |
|
I think my change is covered by the existing integration tests There are four ways to specify the source_path when using the 'terraform-aws-modules/lambda/aws' module. Terraform's documentation shows examples for both Style 1 and Style 4 Previously only Styles 1,2, and 3 were supported by sam cli. If Style 4 was used sam cli would try to validate the path by calling Since the existing Let me know if you have another questions about this PR |
mildaniel
left a comment
There was a problem hiding this comment.
This makes sense to me, thanks for the contribution! I left a small question.
I also agree with @sriram-mv on the integration testing. Let's add a case that explicitly tests for source_path defined as a list of dicts. Since this wasn't working before, we probably aren't testing this exact case today. We can just add the a new module to one of the existing test cases with this particular format.
…4518) Bumps [setuptools](https://github.com/pypa/setuptools) from 54.2.0 to 65.5.1. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst) - [Commits](pypa/setuptools@v54.2.0...v65.5.1) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lau <lauwing@f8ffc25e8e59.ant.amazon.com>
* Adding tarfile member sanitization to extractall() * fix formatting issues * Refactored extract_tarfile functions and added unit/functional tests Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com> Co-authored-by: Mohamed Elasmar <71043312+moelasmar@users.noreply.github.com> Co-authored-by: hnnasit <84355507+hnnasit@users.noreply.github.com> Co-authored-by: Haresh Nasit <hnnasit@amazon.com> Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
…updates (#4476) * Add in instructions on updating SAMCLI dependencies * Update the command to be run to write to reproducible linux * Highlight content using separate sections for requirement files * Fix typos and reword for better readability * Update development guide text
* chore: update readme with pypi license * use gh rather than pypi
|
I've added integration tests and reworked the code remove the shallow copy and recursion |
hawflau
left a comment
There was a problem hiding this comment.
Thanks for updating the PR. Just one small change request. Otherwise it's good!
hawflau
left a comment
There was a problem hiding this comment.
Thanks for your contribution! LGTM!
Which issue(s) does this change fix?
#4495
Why is this change necessary?
Terraform supports specifying source path several different ways including as a list of maps which translate to a list of dicts in SAM's python implementation
How does it address the issue?
Currently sam cli's terraform hook handles strings, list of strings, and dicts, but not list of dicts.
What side effects does this change have?
None
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.