@@ -73,7 +73,144 @@ module "lambda_function" {
73
73
// }
74
74
// }
75
75
76
- source_path = " ${ path . module } /../fixtures/python3.8-app1/"
76
+ // source_path = "${path.module}/../fixtures/python3.8-app1/"
77
+
78
+ // source_path = [
79
+ // "${path.module}/../fixtures/python3.8-app1/index.py",
80
+ // {
81
+ // pip_requirements = "${path.module}/../fixtures/python3.8-app1/requirements.txt"
82
+ // prefix_in_zip = "vendor"
83
+ // }
84
+ // ]
85
+
86
+ // source_path = [
87
+ // "${path.module}/../fixtures/python3.8-app1/index.py",
88
+ // "${path.module}/../fixtures/python3.8-app1/dir1/dir2",
89
+ // {
90
+ // pip_requirements = "${path.module}/../fixtures/python3.8-app1/requirements.txt"
91
+ // }
92
+ // ]
93
+
94
+ // source_path = [
95
+ // {
96
+ // path = "${path.module}/../fixtures/python3.8-app1"
97
+ // }
98
+ // ]
99
+
100
+ // source_path = [
101
+ // {
102
+ // path = "${path.module}/../fixtures/python3.8-app1"
103
+ // pip_requirements = false
104
+ // }
105
+ // ]
106
+
107
+ // source_path = [
108
+ // {
109
+ // path = "${path.module}/../fixtures/python3.8-app1"
110
+ // pip_requirements = true
111
+ // }
112
+ // ]
113
+
114
+ // source_path = [
115
+ // {
116
+ // path = "${path.module}/../fixtures/python3.8-app1"
117
+ // commands = [
118
+ // ":zip",
119
+ // "cd `mktemp -d`",
120
+ // "pip install --target=. -r ${path.module}/../fixtures/python3.8-app1/requirements.txt",
121
+ // ":zip . vendor/",
122
+ // ]
123
+ // patterns = [
124
+ // "!vendor/colorful-0.5.4.dist-info/RECORD",
125
+ // "!vendor/colorful-.+.dist-info/.*",
126
+ // "!vendor/colorful/__pycache__/?.*",
127
+ // ]
128
+ // }
129
+ // ]
130
+
131
+ source_path = [
132
+ // {
133
+ // pip_requirements = "${path.module}/../fixtures/python3.8-app1/requirements.txt"
134
+ // pip_requirements = "${path.module}/../deploy/requirements.txt"
135
+ // },
136
+ " ${ path . module } /../fixtures/python3.8-app1/index.py" ,
137
+ // {
138
+ // path = "${path.module}/../fixtures/python3.8-app1/index.py"
139
+ // patterns = <<END
140
+ // # To use comments in heredoc patterns set the env var:
141
+ // # export TF_LAMBDA_PACKAGE_PATTERN_COMMENTS=true
142
+ // # The intent for comments just to use in examples and demo snippets.
143
+ // # To write a comment start it with double spaces and the # sign
144
+ // # if it follows a pattern.
145
+ //
146
+ // !index\.py # Exclude a file with 'index.py' name
147
+ // index\..* # Re-include
148
+ // END
149
+ // },
150
+ // {
151
+ // path = "${path.module}/../fixtures/dirtree"
152
+ // // prefix_in_zip = "vendor"
153
+ // patterns = <<END
154
+ // # To see step by step output how files and folders was skipped or added
155
+ // # set an env var in your shell by a command similar to:
156
+ // # export TF_LAMBDA_PACKAGE_LOG_LEVEL=DEBUG
157
+ //
158
+ // # To play with this demo pattern you can go to a ../fixtures folder
159
+ // # and run there a dirtree.sh script to create a demo dirs tree
160
+ // # matchable by following patterns.
161
+ //
162
+ // # !abc/.* # Filter out everything in an abc folder with the folder itself
163
+ // # !abc/.+ # Filter out just all folder's content but keep the folder even if it's empty
164
+ // abc/def/.* # Re-include everything in abc/def sub folder
165
+ // # !abc/def/ghk/.* # Filter out again in abc/def/ghk sub folder
166
+ // !.*/fiv.*
167
+ // !.*/zi--.*
168
+ //
169
+ // ########################################################################
170
+ // # Special cases
171
+ //
172
+ // # !.*/ # Removes all explicit directories from a zip file, mean while
173
+ // # the zip file still valid and unpacks correctly but will not
174
+ // # contain any empty directories.
175
+ //
176
+ // # !.*/bar/ # To remove just some directory use more qualified path to it.
177
+ //
178
+ // # !([^/]+/){3,} # Remove all directories more than 3 folders in depth.
179
+ // END
180
+ // }
181
+ ]
182
+
183
+ // source_path = [
184
+ // {
185
+ // // path = "${path.module}/../fixtures/python3.8-app1"
186
+ //
187
+ // // pip_requirements = true
188
+ // pip_requirements = "${path.module}/../fixtures/python3.8-app1/requirements.txt"
189
+ // prefix_in_zip = "vendor"
190
+ // // commands = ["pip install -r requirements.txt"]
191
+ //
192
+ // // patterns = <<END
193
+ // // !.*/.*\.txt # Filter all txt files recursively
194
+ // // node_modules/.* # Include empty dir or with a content if it exists
195
+ // // node_modules/.+ # Include full non empty node_modules dir with its content
196
+ // // node_modules/ # Include node_modules itself without its content
197
+ // // # It's also a way to include an empty dir if it exists
198
+ // // node_modules # Include a file or an existing dir only
199
+ // //
200
+ // // !abc/.* # Filter out everything in an abc folder
201
+ // // abc/def/.* # Re-include everything in abc/def sub folder
202
+ // // !abc/def/ghk/.* # Filter out again in abc/def/ghk sub folder
203
+ // // END
204
+ //
205
+ // patterns = [
206
+ // "**/*.txt",
207
+ // "",
208
+ // "",
209
+ // ]
210
+ // },
211
+ //
212
+ // ]
213
+
77
214
// source_path = [
78
215
// "${path.module}/../fixtures/python3.8-app1-extra",
79
216
// {
@@ -127,7 +264,7 @@ module "lambda_function" {
127
264
//
128
265
// !abc/.* # Filter out everything in an abc folder
129
266
// abc/def/.* # Re-include everything in abc/def sub folder
130
- // !abc/def/hgk /* # Filter out again in abc/def/hgk sub folder
267
+ // !abc/def/ghk /* # Filter out again in abc/def/ghk sub folder
131
268
// END
132
269
// },
133
270
// {
@@ -138,11 +275,12 @@ module "lambda_function" {
138
275
// }
139
276
// ]
140
277
141
- // build_in_docker = true
142
- // docker_file = "${path.module}/../fixtures/python3.8-app1/docker/Dockerfile"
143
- // docker_build_root = "${path.module}/../../docker"
144
- // #docker_image = "lambci/lambda:build-python3.8"
145
- // #docker_with_ssh_agent = true
278
+ // build_in_docker = true
279
+ // docker_pip_cache = true
280
+ // docker_with_ssh_agent = true
281
+ // docker_file = "${path.module}/../fixtures/python3.8-app1/docker/Dockerfile"
282
+ // docker_build_root = "${path.module}/../../docker"
283
+ // docker_image = "lambci/lambda:build-python3.8"
146
284
}
147
285
148
286
# ###
0 commit comments