-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: support specifying included files for Code.from_asset #26107
Comments
Thanks for your use case sharing. |
Hi, Pahud! I have a question for you on this issue. Specifically, I am thinking of the following approach.
I haven't submitted a PR yet, but I've implemented it as a trial. I'll let you know what you think and make a decision. |
@go-to-k Yes this sounds like a good idea! Feel free to submit your PR draft for that, the maintainers would be happy to review your PR. |
Thank you! I will submit PR! |
It was mentioned that the |
I also submitted the PR for the docs of exclude property using a negation. |
Describe the feature
Add a property to
Code.from_asset
to indicate which particular files within the path should be included. If this property is present, only files matching the pattern will be considered. It is an error to specify this property if the path does not describe a directory.Use Case
We have a bunch of Go lambda functions in one repository. We can easily compile multiple of them in parallel with
go build -o $DIR my-module/cmd/...
. However, this places all the binaries together in one directory. We would like to be able to reference this directory inCode.from_assets
and filter it to only the particular binary name that goes with the Lambda function in question.Currently we have to manually arrange for each binary to be in its own folder, which is really annoying.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.85.0
Environment details (OS name and version, etc.)
Alpine 3.18
The text was updated successfully, but these errors were encountered: