Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ source_path = [
]
}, {
path = "src/python3.8-app3",
commands = ["npm install"],
commands = [
"npm install",
":zip"
],
patterns = [
"!.*/.*\\.txt", # Skip all txt files recursively
"node_modules/.+", # Include all node_modules
Expand Down Expand Up @@ -424,6 +427,7 @@ Few notes:
```

* `commands` - List of commands to run. If specified, this argument overrides `pip_requirements`.
* `:zip [source] [destination]` is a special command which creates content of current working directory (first argument) and places it inside of path (second argument).
* `pip_requirements` - Controls whether to execute `pip install`. Set to `false` to disable this feature, `true` to run `pip install` with `requirements.txt` found in `path`. Or set to another filename which you want to use instead.
* `prefix_in_zip` - If specified, will be used as a prefix inside zip-archive. By default, everything installs into the root of zip-archive.

Expand Down
15 changes: 12 additions & 3 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ module "lambda_function" {
# },
# {
# path = "${path.module}/../fixtures/python3.8-app1"
# commands = ["npm install"]
# commands = [
# "npm install",
# ":zip"
# ]
# prefix_in_zip = "foo/bar",
# patterns = [
# "!.*/.*\\.txt", # Filter all txt files recursively
Expand All @@ -264,7 +267,10 @@ module "lambda_function" {
# },
# {
# path = "${path.module}/../fixtures/python3.8-app1"
# commands = ["npm install"]
# commands = [
# "npm install",
# ":zip"
# ]
# prefix_in_zip = "foo/bar", # By default everything installs into the root of a zip package
# patterns = <<END
# !.*/.*\.txt # Filter all txt files recursively
Expand All @@ -281,7 +287,10 @@ module "lambda_function" {
# },
# {
# path = "${path.module}/../fixtures/python3.8-app1"
# commands = ["npm install"]
# commands = [
# "npm install",
# ":zip"
# ]
# prefix_in_zip = "foo/bar",
# patterns = [".*"] # default
# }
Expand Down