skuba 4.3.0-beta.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/jest/moduleNameMapper.test.ts +7 -8
- package/lib/api/git/pull.d.ts +3 -3
- package/lib/api/git/pull.js +1 -1
- package/lib/api/github/index.d.ts +1 -1
- package/lib/api/github/index.js +4 -4
- package/lib/api/github/index.js.map +1 -1
- package/lib/api/github/push.d.ts +25 -14
- package/lib/api/github/push.js +41 -26
- package/lib/api/github/push.js.map +1 -1
- package/lib/api/jest/index.d.ts +23 -24
- package/lib/api/jest/index.js.map +1 -1
- package/lib/cli/configure/analyseDependencies.js +1 -2
- package/lib/cli/configure/analyseDependencies.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +2 -2
- package/lib/cli/configure/ensureTemplateCompletion.js.map +1 -1
- package/lib/cli/configure/modules/tsconfig.js +3 -2
- package/lib/cli/configure/modules/tsconfig.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +2 -2
- package/lib/cli/configure/processing/package.js +8 -10
- package/lib/cli/configure/processing/package.js.map +1 -1
- package/lib/cli/lint/autofix.js +3 -2
- package/lib/cli/lint/autofix.js.map +1 -1
- package/lib/cli/test/reporters/github/annotations.js +4 -1
- package/lib/cli/test/reporters/github/annotations.js.map +1 -1
- package/lib/utils/args.d.ts +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +11 -3
- package/lib/utils/version.js.map +1 -1
- package/package.json +51 -24
- package/template/base/_.eslintignore +5 -2
- package/template/base/_.gitignore +3 -2
- package/template/base/_.prettierignore +5 -2
- package/template/express-rest-api/.buildkite/pipeline.yml +4 -4
- package/template/express-rest-api/.gantry/common.yml +1 -1
- package/template/express-rest-api/Dockerfile +1 -1
- package/template/express-rest-api/Dockerfile.dev-deps +1 -1
- package/template/express-rest-api/README.md +11 -14
- package/template/express-rest-api/gantry.apply.yml +2 -0
- package/template/express-rest-api/gantry.build.yml +2 -0
- package/template/express-rest-api/package.json +1 -1
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/Dockerfile +1 -1
- package/template/greeter/README.md +12 -15
- package/template/koa-rest-api/.buildkite/pipeline.yml +4 -4
- package/template/koa-rest-api/.gantry/common.yml +1 -1
- package/template/koa-rest-api/Dockerfile +1 -1
- package/template/koa-rest-api/Dockerfile.dev-deps +1 -1
- package/template/koa-rest-api/README.md +11 -14
- package/template/koa-rest-api/gantry.apply.yml +2 -0
- package/template/koa-rest-api/gantry.build.yml +2 -0
- package/template/koa-rest-api/package.json +5 -5
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +7 -3
- package/template/koa-rest-api/src/framework/server.test.ts +18 -18
- package/template/koa-rest-api/src/framework/validation.test.ts +15 -6
- package/template/lambda-sqs-worker/.buildkite/pipeline.yml +2 -3
- package/template/lambda-sqs-worker/Dockerfile +1 -1
- package/template/lambda-sqs-worker/README.md +10 -13
- package/template/lambda-sqs-worker/package.json +1 -1
- package/template/lambda-sqs-worker/serverless.yml +0 -3
- package/template/lambda-sqs-worker/src/app.test.ts +7 -7
- package/template/lambda-sqs-worker/src/framework/handler.test.ts +3 -3
- package/template/lambda-sqs-worker/src/framework/validation.test.ts +17 -10
- package/template/lambda-sqs-worker/src/services/jobScorer.test.ts +2 -2
- package/template/lambda-sqs-worker/src/services/pipelineEventSender.test.ts +1 -1
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/Dockerfile +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +224 -218
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -0
- package/template/oss-npm-package/README.md +9 -11
- package/template/oss-npm-package/_package.json +1 -1
- package/template/private-npm-package/README.md +6 -12
- package/template/private-npm-package/_package.json +1 -1
- package/template/express-rest-api/.me +0 -22
- package/template/greeter/.me +0 -20
- package/template/koa-rest-api/.me +0 -22
- package/template/lambda-sqs-worker/.me +0 -22
- package/template/lambda-sqs-worker-cdk/.me +0 -22
- package/template/oss-npm-package/.me +0 -21
- package/template/private-npm-package/.me +0 -21
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`returns expected CloudFormation stack for dev 1`] = `
|
|
4
|
-
|
|
5
|
-
"Resources":
|
|
6
|
-
"kmskey49FBC3B3":
|
|
4
|
+
{
|
|
5
|
+
"Resources": {
|
|
6
|
+
"kmskey49FBC3B3": {
|
|
7
7
|
"DeletionPolicy": "Retain",
|
|
8
|
-
"Properties":
|
|
8
|
+
"Properties": {
|
|
9
9
|
"Description": "serviceName",
|
|
10
10
|
"EnableKeyRotation": true,
|
|
11
|
-
"KeyPolicy":
|
|
12
|
-
"Statement":
|
|
13
|
-
|
|
11
|
+
"KeyPolicy": {
|
|
12
|
+
"Statement": [
|
|
13
|
+
{
|
|
14
14
|
"Action": "kms:*",
|
|
15
15
|
"Effect": "Allow",
|
|
16
|
-
"Principal":
|
|
17
|
-
"AWS":
|
|
18
|
-
"Fn::Join":
|
|
16
|
+
"Principal": {
|
|
17
|
+
"AWS": {
|
|
18
|
+
"Fn::Join": [
|
|
19
19
|
"",
|
|
20
|
-
|
|
20
|
+
[
|
|
21
21
|
"arn:",
|
|
22
|
-
|
|
22
|
+
{
|
|
23
23
|
"Ref": "AWS::Partition",
|
|
24
24
|
},
|
|
25
25
|
":iam::",
|
|
26
|
-
|
|
26
|
+
{
|
|
27
27
|
"Ref": "AWS::AccountId",
|
|
28
28
|
},
|
|
29
29
|
":root",
|
|
@@ -33,8 +33,8 @@ Object {
|
|
|
33
33
|
},
|
|
34
34
|
"Resource": "*",
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
"Action":
|
|
36
|
+
{
|
|
37
|
+
"Action": [
|
|
38
38
|
"kms:Create*",
|
|
39
39
|
"kms:Describe*",
|
|
40
40
|
"kms:Enable*",
|
|
@@ -51,17 +51,17 @@ Object {
|
|
|
51
51
|
"kms:CancelKeyDeletion",
|
|
52
52
|
],
|
|
53
53
|
"Effect": "Allow",
|
|
54
|
-
"Principal":
|
|
55
|
-
"AWS":
|
|
56
|
-
"Fn::Join":
|
|
54
|
+
"Principal": {
|
|
55
|
+
"AWS": {
|
|
56
|
+
"Fn::Join": [
|
|
57
57
|
"",
|
|
58
|
-
|
|
58
|
+
[
|
|
59
59
|
"arn:",
|
|
60
|
-
|
|
60
|
+
{
|
|
61
61
|
"Ref": "AWS::Partition",
|
|
62
62
|
},
|
|
63
63
|
":iam::",
|
|
64
|
-
|
|
64
|
+
{
|
|
65
65
|
"Ref": "AWS::AccountId",
|
|
66
66
|
},
|
|
67
67
|
":root",
|
|
@@ -71,24 +71,24 @@ Object {
|
|
|
71
71
|
},
|
|
72
72
|
"Resource": "*",
|
|
73
73
|
},
|
|
74
|
-
|
|
75
|
-
"Action":
|
|
74
|
+
{
|
|
75
|
+
"Action": [
|
|
76
76
|
"kms:Encrypt",
|
|
77
77
|
"kms:ReEncrypt*",
|
|
78
78
|
"kms:GenerateDataKey*",
|
|
79
79
|
],
|
|
80
80
|
"Effect": "Allow",
|
|
81
|
-
"Principal":
|
|
82
|
-
"AWS":
|
|
83
|
-
"Fn::Join":
|
|
81
|
+
"Principal": {
|
|
82
|
+
"AWS": {
|
|
83
|
+
"Fn::Join": [
|
|
84
84
|
"",
|
|
85
|
-
|
|
85
|
+
[
|
|
86
86
|
"arn:",
|
|
87
|
-
|
|
87
|
+
{
|
|
88
88
|
"Ref": "AWS::Partition",
|
|
89
89
|
},
|
|
90
90
|
":iam::",
|
|
91
|
-
|
|
91
|
+
{
|
|
92
92
|
"Ref": "AWS::AccountId",
|
|
93
93
|
},
|
|
94
94
|
":root",
|
|
@@ -98,13 +98,13 @@ Object {
|
|
|
98
98
|
},
|
|
99
99
|
"Resource": "*",
|
|
100
100
|
},
|
|
101
|
-
|
|
102
|
-
"Action":
|
|
101
|
+
{
|
|
102
|
+
"Action": [
|
|
103
103
|
"kms:Decrypt",
|
|
104
104
|
"kms:GenerateDataKey",
|
|
105
105
|
],
|
|
106
106
|
"Effect": "Allow",
|
|
107
|
-
"Principal":
|
|
107
|
+
"Principal": {
|
|
108
108
|
"Service": "sns.amazonaws.com",
|
|
109
109
|
},
|
|
110
110
|
"Resource": "*",
|
|
@@ -116,11 +116,11 @@ Object {
|
|
|
116
116
|
"Type": "AWS::KMS::Key",
|
|
117
117
|
"UpdateReplacePolicy": "Retain",
|
|
118
118
|
},
|
|
119
|
-
"kmskeyAlias39245779":
|
|
120
|
-
"Properties":
|
|
119
|
+
"kmskeyAlias39245779": {
|
|
120
|
+
"Properties": {
|
|
121
121
|
"AliasName": "alias/seek/self/serviceName",
|
|
122
|
-
"TargetKeyId":
|
|
123
|
-
"Fn::GetAtt":
|
|
122
|
+
"TargetKeyId": {
|
|
123
|
+
"Fn::GetAtt": [
|
|
124
124
|
"kmskey49FBC3B3",
|
|
125
125
|
"Arn",
|
|
126
126
|
],
|
|
@@ -128,10 +128,10 @@ Object {
|
|
|
128
128
|
},
|
|
129
129
|
"Type": "AWS::KMS::Alias",
|
|
130
130
|
},
|
|
131
|
-
"topic69831491":
|
|
132
|
-
"Properties":
|
|
133
|
-
"KmsMasterKeyId":
|
|
134
|
-
"Fn::GetAtt":
|
|
131
|
+
"topic69831491": {
|
|
132
|
+
"Properties": {
|
|
133
|
+
"KmsMasterKeyId": {
|
|
134
|
+
"Fn::GetAtt": [
|
|
135
135
|
"kmskey49FBC3B3",
|
|
136
136
|
"Arn",
|
|
137
137
|
],
|
|
@@ -140,20 +140,23 @@ Object {
|
|
|
140
140
|
},
|
|
141
141
|
"Type": "AWS::SNS::Topic",
|
|
142
142
|
},
|
|
143
|
-
"worker28EA3E30":
|
|
144
|
-
"DependsOn":
|
|
143
|
+
"worker28EA3E30": {
|
|
144
|
+
"DependsOn": [
|
|
145
145
|
"workerServiceRoleDefaultPolicyBA498553",
|
|
146
146
|
"workerServiceRole2130CC7F",
|
|
147
147
|
],
|
|
148
|
-
"Properties":
|
|
149
|
-
"
|
|
150
|
-
"
|
|
148
|
+
"Properties": {
|
|
149
|
+
"Architectures": [
|
|
150
|
+
"arm64",
|
|
151
|
+
],
|
|
152
|
+
"Code": {
|
|
153
|
+
"S3Bucket": {
|
|
151
154
|
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
|
|
152
155
|
},
|
|
153
156
|
"S3Key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.zip",
|
|
154
157
|
},
|
|
155
|
-
"Environment":
|
|
156
|
-
"Variables":
|
|
158
|
+
"Environment": {
|
|
159
|
+
"Variables": {
|
|
157
160
|
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
|
|
158
161
|
"NODE_ENV": "production",
|
|
159
162
|
"NODE_OPTIONS": "--enable-source-maps",
|
|
@@ -162,14 +165,14 @@ Object {
|
|
|
162
165
|
},
|
|
163
166
|
"FunctionName": "serviceName",
|
|
164
167
|
"Handler": "app.handler",
|
|
165
|
-
"KmsKeyArn":
|
|
166
|
-
"Fn::GetAtt":
|
|
168
|
+
"KmsKeyArn": {
|
|
169
|
+
"Fn::GetAtt": [
|
|
167
170
|
"kmskey49FBC3B3",
|
|
168
171
|
"Arn",
|
|
169
172
|
],
|
|
170
173
|
},
|
|
171
|
-
"Role":
|
|
172
|
-
"Fn::GetAtt":
|
|
174
|
+
"Role": {
|
|
175
|
+
"Fn::GetAtt": [
|
|
173
176
|
"workerServiceRole2130CC7F",
|
|
174
177
|
"Arn",
|
|
175
178
|
],
|
|
@@ -178,27 +181,27 @@ Object {
|
|
|
178
181
|
},
|
|
179
182
|
"Type": "AWS::Lambda::Function",
|
|
180
183
|
},
|
|
181
|
-
"workerServiceRole2130CC7F":
|
|
182
|
-
"Properties":
|
|
183
|
-
"AssumeRolePolicyDocument":
|
|
184
|
-
"Statement":
|
|
185
|
-
|
|
184
|
+
"workerServiceRole2130CC7F": {
|
|
185
|
+
"Properties": {
|
|
186
|
+
"AssumeRolePolicyDocument": {
|
|
187
|
+
"Statement": [
|
|
188
|
+
{
|
|
186
189
|
"Action": "sts:AssumeRole",
|
|
187
190
|
"Effect": "Allow",
|
|
188
|
-
"Principal":
|
|
191
|
+
"Principal": {
|
|
189
192
|
"Service": "lambda.amazonaws.com",
|
|
190
193
|
},
|
|
191
194
|
},
|
|
192
195
|
],
|
|
193
196
|
"Version": "2012-10-17",
|
|
194
197
|
},
|
|
195
|
-
"ManagedPolicyArns":
|
|
196
|
-
|
|
197
|
-
"Fn::Join":
|
|
198
|
+
"ManagedPolicyArns": [
|
|
199
|
+
{
|
|
200
|
+
"Fn::Join": [
|
|
198
201
|
"",
|
|
199
|
-
|
|
202
|
+
[
|
|
200
203
|
"arn:",
|
|
201
|
-
|
|
204
|
+
{
|
|
202
205
|
"Ref": "AWS::Partition",
|
|
203
206
|
},
|
|
204
207
|
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
|
|
@@ -209,12 +212,12 @@ Object {
|
|
|
209
212
|
},
|
|
210
213
|
"Type": "AWS::IAM::Role",
|
|
211
214
|
},
|
|
212
|
-
"workerServiceRoleDefaultPolicyBA498553":
|
|
213
|
-
"Properties":
|
|
214
|
-
"PolicyDocument":
|
|
215
|
-
"Statement":
|
|
216
|
-
|
|
217
|
-
"Action":
|
|
215
|
+
"workerServiceRoleDefaultPolicyBA498553": {
|
|
216
|
+
"Properties": {
|
|
217
|
+
"PolicyDocument": {
|
|
218
|
+
"Statement": [
|
|
219
|
+
{
|
|
220
|
+
"Action": [
|
|
218
221
|
"sqs:ReceiveMessage",
|
|
219
222
|
"sqs:ChangeMessageVisibility",
|
|
220
223
|
"sqs:GetQueueUrl",
|
|
@@ -222,18 +225,18 @@ Object {
|
|
|
222
225
|
"sqs:GetQueueAttributes",
|
|
223
226
|
],
|
|
224
227
|
"Effect": "Allow",
|
|
225
|
-
"Resource":
|
|
226
|
-
"Fn::GetAtt":
|
|
228
|
+
"Resource": {
|
|
229
|
+
"Fn::GetAtt": [
|
|
227
230
|
"workerqueueA05CE5C6",
|
|
228
231
|
"Arn",
|
|
229
232
|
],
|
|
230
233
|
},
|
|
231
234
|
},
|
|
232
|
-
|
|
235
|
+
{
|
|
233
236
|
"Action": "kms:Decrypt",
|
|
234
237
|
"Effect": "Allow",
|
|
235
|
-
"Resource":
|
|
236
|
-
"Fn::GetAtt":
|
|
238
|
+
"Resource": {
|
|
239
|
+
"Fn::GetAtt": [
|
|
237
240
|
"kmskey49FBC3B3",
|
|
238
241
|
"Arn",
|
|
239
242
|
],
|
|
@@ -243,41 +246,41 @@ Object {
|
|
|
243
246
|
"Version": "2012-10-17",
|
|
244
247
|
},
|
|
245
248
|
"PolicyName": "workerServiceRoleDefaultPolicyBA498553",
|
|
246
|
-
"Roles":
|
|
247
|
-
|
|
249
|
+
"Roles": [
|
|
250
|
+
{
|
|
248
251
|
"Ref": "workerServiceRole2130CC7F",
|
|
249
252
|
},
|
|
250
253
|
],
|
|
251
254
|
},
|
|
252
255
|
"Type": "AWS::IAM::Policy",
|
|
253
256
|
},
|
|
254
|
-
"workerSqsEventSourceappStackworkerqueue8281B9F47B9F582B":
|
|
255
|
-
"Properties":
|
|
256
|
-
"EventSourceArn":
|
|
257
|
-
"Fn::GetAtt":
|
|
257
|
+
"workerSqsEventSourceappStackworkerqueue8281B9F47B9F582B": {
|
|
258
|
+
"Properties": {
|
|
259
|
+
"EventSourceArn": {
|
|
260
|
+
"Fn::GetAtt": [
|
|
258
261
|
"workerqueueA05CE5C6",
|
|
259
262
|
"Arn",
|
|
260
263
|
],
|
|
261
264
|
},
|
|
262
|
-
"FunctionName":
|
|
265
|
+
"FunctionName": {
|
|
263
266
|
"Ref": "worker28EA3E30",
|
|
264
267
|
},
|
|
265
268
|
},
|
|
266
269
|
"Type": "AWS::Lambda::EventSourceMapping",
|
|
267
270
|
},
|
|
268
|
-
"workerqueueA05CE5C6":
|
|
271
|
+
"workerqueueA05CE5C6": {
|
|
269
272
|
"DeletionPolicy": "Delete",
|
|
270
|
-
"Properties":
|
|
271
|
-
"KmsMasterKeyId":
|
|
272
|
-
"Fn::GetAtt":
|
|
273
|
+
"Properties": {
|
|
274
|
+
"KmsMasterKeyId": {
|
|
275
|
+
"Fn::GetAtt": [
|
|
273
276
|
"kmskey49FBC3B3",
|
|
274
277
|
"Arn",
|
|
275
278
|
],
|
|
276
279
|
},
|
|
277
280
|
"QueueName": "serviceName",
|
|
278
|
-
"RedrivePolicy":
|
|
279
|
-
"deadLetterTargetArn":
|
|
280
|
-
"Fn::GetAtt":
|
|
281
|
+
"RedrivePolicy": {
|
|
282
|
+
"deadLetterTargetArn": {
|
|
283
|
+
"Fn::GetAtt": [
|
|
281
284
|
"workerqueuedlq42262778",
|
|
282
285
|
"Arn",
|
|
283
286
|
],
|
|
@@ -288,25 +291,25 @@ Object {
|
|
|
288
291
|
"Type": "AWS::SQS::Queue",
|
|
289
292
|
"UpdateReplacePolicy": "Delete",
|
|
290
293
|
},
|
|
291
|
-
"workerqueuePolicy97054CB4":
|
|
292
|
-
"Properties":
|
|
293
|
-
"PolicyDocument":
|
|
294
|
-
"Statement":
|
|
295
|
-
|
|
294
|
+
"workerqueuePolicy97054CB4": {
|
|
295
|
+
"Properties": {
|
|
296
|
+
"PolicyDocument": {
|
|
297
|
+
"Statement": [
|
|
298
|
+
{
|
|
296
299
|
"Action": "sqs:SendMessage",
|
|
297
|
-
"Condition":
|
|
298
|
-
"ArnEquals":
|
|
299
|
-
"aws:SourceArn":
|
|
300
|
+
"Condition": {
|
|
301
|
+
"ArnEquals": {
|
|
302
|
+
"aws:SourceArn": {
|
|
300
303
|
"Ref": "topic69831491",
|
|
301
304
|
},
|
|
302
305
|
},
|
|
303
306
|
},
|
|
304
307
|
"Effect": "Allow",
|
|
305
|
-
"Principal":
|
|
308
|
+
"Principal": {
|
|
306
309
|
"Service": "sns.amazonaws.com",
|
|
307
310
|
},
|
|
308
|
-
"Resource":
|
|
309
|
-
"Fn::GetAtt":
|
|
311
|
+
"Resource": {
|
|
312
|
+
"Fn::GetAtt": [
|
|
310
313
|
"workerqueueA05CE5C6",
|
|
311
314
|
"Arn",
|
|
312
315
|
],
|
|
@@ -315,34 +318,34 @@ Object {
|
|
|
315
318
|
],
|
|
316
319
|
"Version": "2012-10-17",
|
|
317
320
|
},
|
|
318
|
-
"Queues":
|
|
319
|
-
|
|
321
|
+
"Queues": [
|
|
322
|
+
{
|
|
320
323
|
"Ref": "workerqueueA05CE5C6",
|
|
321
324
|
},
|
|
322
325
|
],
|
|
323
326
|
},
|
|
324
327
|
"Type": "AWS::SQS::QueuePolicy",
|
|
325
328
|
},
|
|
326
|
-
"workerqueueappStacktopic0CA45134AFB31FF4":
|
|
327
|
-
"Properties":
|
|
328
|
-
"Endpoint":
|
|
329
|
-
"Fn::GetAtt":
|
|
329
|
+
"workerqueueappStacktopic0CA45134AFB31FF4": {
|
|
330
|
+
"Properties": {
|
|
331
|
+
"Endpoint": {
|
|
332
|
+
"Fn::GetAtt": [
|
|
330
333
|
"workerqueueA05CE5C6",
|
|
331
334
|
"Arn",
|
|
332
335
|
],
|
|
333
336
|
},
|
|
334
337
|
"Protocol": "sqs",
|
|
335
|
-
"TopicArn":
|
|
338
|
+
"TopicArn": {
|
|
336
339
|
"Ref": "topic69831491",
|
|
337
340
|
},
|
|
338
341
|
},
|
|
339
342
|
"Type": "AWS::SNS::Subscription",
|
|
340
343
|
},
|
|
341
|
-
"workerqueuedlq42262778":
|
|
344
|
+
"workerqueuedlq42262778": {
|
|
342
345
|
"DeletionPolicy": "Delete",
|
|
343
|
-
"Properties":
|
|
344
|
-
"KmsMasterKeyId":
|
|
345
|
-
"Fn::GetAtt":
|
|
346
|
+
"Properties": {
|
|
347
|
+
"KmsMasterKeyId": {
|
|
348
|
+
"Fn::GetAtt": [
|
|
346
349
|
"kmskey49FBC3B3",
|
|
347
350
|
"Arn",
|
|
348
351
|
],
|
|
@@ -357,29 +360,29 @@ Object {
|
|
|
357
360
|
`;
|
|
358
361
|
|
|
359
362
|
exports[`returns expected CloudFormation stack for prod 1`] = `
|
|
360
|
-
|
|
361
|
-
"Resources":
|
|
362
|
-
"kmskey49FBC3B3":
|
|
363
|
+
{
|
|
364
|
+
"Resources": {
|
|
365
|
+
"kmskey49FBC3B3": {
|
|
363
366
|
"DeletionPolicy": "Retain",
|
|
364
|
-
"Properties":
|
|
367
|
+
"Properties": {
|
|
365
368
|
"Description": "serviceName",
|
|
366
369
|
"EnableKeyRotation": true,
|
|
367
|
-
"KeyPolicy":
|
|
368
|
-
"Statement":
|
|
369
|
-
|
|
370
|
+
"KeyPolicy": {
|
|
371
|
+
"Statement": [
|
|
372
|
+
{
|
|
370
373
|
"Action": "kms:*",
|
|
371
374
|
"Effect": "Allow",
|
|
372
|
-
"Principal":
|
|
373
|
-
"AWS":
|
|
374
|
-
"Fn::Join":
|
|
375
|
+
"Principal": {
|
|
376
|
+
"AWS": {
|
|
377
|
+
"Fn::Join": [
|
|
375
378
|
"",
|
|
376
|
-
|
|
379
|
+
[
|
|
377
380
|
"arn:",
|
|
378
|
-
|
|
381
|
+
{
|
|
379
382
|
"Ref": "AWS::Partition",
|
|
380
383
|
},
|
|
381
384
|
":iam::",
|
|
382
|
-
|
|
385
|
+
{
|
|
383
386
|
"Ref": "AWS::AccountId",
|
|
384
387
|
},
|
|
385
388
|
":root",
|
|
@@ -389,8 +392,8 @@ Object {
|
|
|
389
392
|
},
|
|
390
393
|
"Resource": "*",
|
|
391
394
|
},
|
|
392
|
-
|
|
393
|
-
"Action":
|
|
395
|
+
{
|
|
396
|
+
"Action": [
|
|
394
397
|
"kms:Create*",
|
|
395
398
|
"kms:Describe*",
|
|
396
399
|
"kms:Enable*",
|
|
@@ -407,17 +410,17 @@ Object {
|
|
|
407
410
|
"kms:CancelKeyDeletion",
|
|
408
411
|
],
|
|
409
412
|
"Effect": "Allow",
|
|
410
|
-
"Principal":
|
|
411
|
-
"AWS":
|
|
412
|
-
"Fn::Join":
|
|
413
|
+
"Principal": {
|
|
414
|
+
"AWS": {
|
|
415
|
+
"Fn::Join": [
|
|
413
416
|
"",
|
|
414
|
-
|
|
417
|
+
[
|
|
415
418
|
"arn:",
|
|
416
|
-
|
|
419
|
+
{
|
|
417
420
|
"Ref": "AWS::Partition",
|
|
418
421
|
},
|
|
419
422
|
":iam::",
|
|
420
|
-
|
|
423
|
+
{
|
|
421
424
|
"Ref": "AWS::AccountId",
|
|
422
425
|
},
|
|
423
426
|
":root",
|
|
@@ -427,24 +430,24 @@ Object {
|
|
|
427
430
|
},
|
|
428
431
|
"Resource": "*",
|
|
429
432
|
},
|
|
430
|
-
|
|
431
|
-
"Action":
|
|
433
|
+
{
|
|
434
|
+
"Action": [
|
|
432
435
|
"kms:Encrypt",
|
|
433
436
|
"kms:ReEncrypt*",
|
|
434
437
|
"kms:GenerateDataKey*",
|
|
435
438
|
],
|
|
436
439
|
"Effect": "Allow",
|
|
437
|
-
"Principal":
|
|
438
|
-
"AWS":
|
|
439
|
-
"Fn::Join":
|
|
440
|
+
"Principal": {
|
|
441
|
+
"AWS": {
|
|
442
|
+
"Fn::Join": [
|
|
440
443
|
"",
|
|
441
|
-
|
|
444
|
+
[
|
|
442
445
|
"arn:",
|
|
443
|
-
|
|
446
|
+
{
|
|
444
447
|
"Ref": "AWS::Partition",
|
|
445
448
|
},
|
|
446
449
|
":iam::",
|
|
447
|
-
|
|
450
|
+
{
|
|
448
451
|
"Ref": "AWS::AccountId",
|
|
449
452
|
},
|
|
450
453
|
":root",
|
|
@@ -454,13 +457,13 @@ Object {
|
|
|
454
457
|
},
|
|
455
458
|
"Resource": "*",
|
|
456
459
|
},
|
|
457
|
-
|
|
458
|
-
"Action":
|
|
460
|
+
{
|
|
461
|
+
"Action": [
|
|
459
462
|
"kms:Decrypt",
|
|
460
463
|
"kms:GenerateDataKey",
|
|
461
464
|
],
|
|
462
465
|
"Effect": "Allow",
|
|
463
|
-
"Principal":
|
|
466
|
+
"Principal": {
|
|
464
467
|
"Service": "sns.amazonaws.com",
|
|
465
468
|
},
|
|
466
469
|
"Resource": "*",
|
|
@@ -472,11 +475,11 @@ Object {
|
|
|
472
475
|
"Type": "AWS::KMS::Key",
|
|
473
476
|
"UpdateReplacePolicy": "Retain",
|
|
474
477
|
},
|
|
475
|
-
"kmskeyAlias39245779":
|
|
476
|
-
"Properties":
|
|
478
|
+
"kmskeyAlias39245779": {
|
|
479
|
+
"Properties": {
|
|
477
480
|
"AliasName": "alias/seek/self/serviceName",
|
|
478
|
-
"TargetKeyId":
|
|
479
|
-
"Fn::GetAtt":
|
|
481
|
+
"TargetKeyId": {
|
|
482
|
+
"Fn::GetAtt": [
|
|
480
483
|
"kmskey49FBC3B3",
|
|
481
484
|
"Arn",
|
|
482
485
|
],
|
|
@@ -484,10 +487,10 @@ Object {
|
|
|
484
487
|
},
|
|
485
488
|
"Type": "AWS::KMS::Alias",
|
|
486
489
|
},
|
|
487
|
-
"topic69831491":
|
|
488
|
-
"Properties":
|
|
489
|
-
"KmsMasterKeyId":
|
|
490
|
-
"Fn::GetAtt":
|
|
490
|
+
"topic69831491": {
|
|
491
|
+
"Properties": {
|
|
492
|
+
"KmsMasterKeyId": {
|
|
493
|
+
"Fn::GetAtt": [
|
|
491
494
|
"kmskey49FBC3B3",
|
|
492
495
|
"Arn",
|
|
493
496
|
],
|
|
@@ -496,20 +499,23 @@ Object {
|
|
|
496
499
|
},
|
|
497
500
|
"Type": "AWS::SNS::Topic",
|
|
498
501
|
},
|
|
499
|
-
"worker28EA3E30":
|
|
500
|
-
"DependsOn":
|
|
502
|
+
"worker28EA3E30": {
|
|
503
|
+
"DependsOn": [
|
|
501
504
|
"workerServiceRoleDefaultPolicyBA498553",
|
|
502
505
|
"workerServiceRole2130CC7F",
|
|
503
506
|
],
|
|
504
|
-
"Properties":
|
|
505
|
-
"
|
|
506
|
-
"
|
|
507
|
+
"Properties": {
|
|
508
|
+
"Architectures": [
|
|
509
|
+
"arm64",
|
|
510
|
+
],
|
|
511
|
+
"Code": {
|
|
512
|
+
"S3Bucket": {
|
|
507
513
|
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
|
|
508
514
|
},
|
|
509
515
|
"S3Key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.zip",
|
|
510
516
|
},
|
|
511
|
-
"Environment":
|
|
512
|
-
"Variables":
|
|
517
|
+
"Environment": {
|
|
518
|
+
"Variables": {
|
|
513
519
|
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
|
|
514
520
|
"NODE_ENV": "production",
|
|
515
521
|
"NODE_OPTIONS": "--enable-source-maps",
|
|
@@ -518,14 +524,14 @@ Object {
|
|
|
518
524
|
},
|
|
519
525
|
"FunctionName": "serviceName",
|
|
520
526
|
"Handler": "app.handler",
|
|
521
|
-
"KmsKeyArn":
|
|
522
|
-
"Fn::GetAtt":
|
|
527
|
+
"KmsKeyArn": {
|
|
528
|
+
"Fn::GetAtt": [
|
|
523
529
|
"kmskey49FBC3B3",
|
|
524
530
|
"Arn",
|
|
525
531
|
],
|
|
526
532
|
},
|
|
527
|
-
"Role":
|
|
528
|
-
"Fn::GetAtt":
|
|
533
|
+
"Role": {
|
|
534
|
+
"Fn::GetAtt": [
|
|
529
535
|
"workerServiceRole2130CC7F",
|
|
530
536
|
"Arn",
|
|
531
537
|
],
|
|
@@ -534,27 +540,27 @@ Object {
|
|
|
534
540
|
},
|
|
535
541
|
"Type": "AWS::Lambda::Function",
|
|
536
542
|
},
|
|
537
|
-
"workerServiceRole2130CC7F":
|
|
538
|
-
"Properties":
|
|
539
|
-
"AssumeRolePolicyDocument":
|
|
540
|
-
"Statement":
|
|
541
|
-
|
|
543
|
+
"workerServiceRole2130CC7F": {
|
|
544
|
+
"Properties": {
|
|
545
|
+
"AssumeRolePolicyDocument": {
|
|
546
|
+
"Statement": [
|
|
547
|
+
{
|
|
542
548
|
"Action": "sts:AssumeRole",
|
|
543
549
|
"Effect": "Allow",
|
|
544
|
-
"Principal":
|
|
550
|
+
"Principal": {
|
|
545
551
|
"Service": "lambda.amazonaws.com",
|
|
546
552
|
},
|
|
547
553
|
},
|
|
548
554
|
],
|
|
549
555
|
"Version": "2012-10-17",
|
|
550
556
|
},
|
|
551
|
-
"ManagedPolicyArns":
|
|
552
|
-
|
|
553
|
-
"Fn::Join":
|
|
557
|
+
"ManagedPolicyArns": [
|
|
558
|
+
{
|
|
559
|
+
"Fn::Join": [
|
|
554
560
|
"",
|
|
555
|
-
|
|
561
|
+
[
|
|
556
562
|
"arn:",
|
|
557
|
-
|
|
563
|
+
{
|
|
558
564
|
"Ref": "AWS::Partition",
|
|
559
565
|
},
|
|
560
566
|
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
|
|
@@ -565,12 +571,12 @@ Object {
|
|
|
565
571
|
},
|
|
566
572
|
"Type": "AWS::IAM::Role",
|
|
567
573
|
},
|
|
568
|
-
"workerServiceRoleDefaultPolicyBA498553":
|
|
569
|
-
"Properties":
|
|
570
|
-
"PolicyDocument":
|
|
571
|
-
"Statement":
|
|
572
|
-
|
|
573
|
-
"Action":
|
|
574
|
+
"workerServiceRoleDefaultPolicyBA498553": {
|
|
575
|
+
"Properties": {
|
|
576
|
+
"PolicyDocument": {
|
|
577
|
+
"Statement": [
|
|
578
|
+
{
|
|
579
|
+
"Action": [
|
|
574
580
|
"sqs:ReceiveMessage",
|
|
575
581
|
"sqs:ChangeMessageVisibility",
|
|
576
582
|
"sqs:GetQueueUrl",
|
|
@@ -578,18 +584,18 @@ Object {
|
|
|
578
584
|
"sqs:GetQueueAttributes",
|
|
579
585
|
],
|
|
580
586
|
"Effect": "Allow",
|
|
581
|
-
"Resource":
|
|
582
|
-
"Fn::GetAtt":
|
|
587
|
+
"Resource": {
|
|
588
|
+
"Fn::GetAtt": [
|
|
583
589
|
"workerqueueA05CE5C6",
|
|
584
590
|
"Arn",
|
|
585
591
|
],
|
|
586
592
|
},
|
|
587
593
|
},
|
|
588
|
-
|
|
594
|
+
{
|
|
589
595
|
"Action": "kms:Decrypt",
|
|
590
596
|
"Effect": "Allow",
|
|
591
|
-
"Resource":
|
|
592
|
-
"Fn::GetAtt":
|
|
597
|
+
"Resource": {
|
|
598
|
+
"Fn::GetAtt": [
|
|
593
599
|
"kmskey49FBC3B3",
|
|
594
600
|
"Arn",
|
|
595
601
|
],
|
|
@@ -599,41 +605,41 @@ Object {
|
|
|
599
605
|
"Version": "2012-10-17",
|
|
600
606
|
},
|
|
601
607
|
"PolicyName": "workerServiceRoleDefaultPolicyBA498553",
|
|
602
|
-
"Roles":
|
|
603
|
-
|
|
608
|
+
"Roles": [
|
|
609
|
+
{
|
|
604
610
|
"Ref": "workerServiceRole2130CC7F",
|
|
605
611
|
},
|
|
606
612
|
],
|
|
607
613
|
},
|
|
608
614
|
"Type": "AWS::IAM::Policy",
|
|
609
615
|
},
|
|
610
|
-
"workerSqsEventSourceappStackworkerqueue8281B9F47B9F582B":
|
|
611
|
-
"Properties":
|
|
612
|
-
"EventSourceArn":
|
|
613
|
-
"Fn::GetAtt":
|
|
616
|
+
"workerSqsEventSourceappStackworkerqueue8281B9F47B9F582B": {
|
|
617
|
+
"Properties": {
|
|
618
|
+
"EventSourceArn": {
|
|
619
|
+
"Fn::GetAtt": [
|
|
614
620
|
"workerqueueA05CE5C6",
|
|
615
621
|
"Arn",
|
|
616
622
|
],
|
|
617
623
|
},
|
|
618
|
-
"FunctionName":
|
|
624
|
+
"FunctionName": {
|
|
619
625
|
"Ref": "worker28EA3E30",
|
|
620
626
|
},
|
|
621
627
|
},
|
|
622
628
|
"Type": "AWS::Lambda::EventSourceMapping",
|
|
623
629
|
},
|
|
624
|
-
"workerqueueA05CE5C6":
|
|
630
|
+
"workerqueueA05CE5C6": {
|
|
625
631
|
"DeletionPolicy": "Delete",
|
|
626
|
-
"Properties":
|
|
627
|
-
"KmsMasterKeyId":
|
|
628
|
-
"Fn::GetAtt":
|
|
632
|
+
"Properties": {
|
|
633
|
+
"KmsMasterKeyId": {
|
|
634
|
+
"Fn::GetAtt": [
|
|
629
635
|
"kmskey49FBC3B3",
|
|
630
636
|
"Arn",
|
|
631
637
|
],
|
|
632
638
|
},
|
|
633
639
|
"QueueName": "serviceName",
|
|
634
|
-
"RedrivePolicy":
|
|
635
|
-
"deadLetterTargetArn":
|
|
636
|
-
"Fn::GetAtt":
|
|
640
|
+
"RedrivePolicy": {
|
|
641
|
+
"deadLetterTargetArn": {
|
|
642
|
+
"Fn::GetAtt": [
|
|
637
643
|
"workerqueuedlq42262778",
|
|
638
644
|
"Arn",
|
|
639
645
|
],
|
|
@@ -644,25 +650,25 @@ Object {
|
|
|
644
650
|
"Type": "AWS::SQS::Queue",
|
|
645
651
|
"UpdateReplacePolicy": "Delete",
|
|
646
652
|
},
|
|
647
|
-
"workerqueuePolicy97054CB4":
|
|
648
|
-
"Properties":
|
|
649
|
-
"PolicyDocument":
|
|
650
|
-
"Statement":
|
|
651
|
-
|
|
653
|
+
"workerqueuePolicy97054CB4": {
|
|
654
|
+
"Properties": {
|
|
655
|
+
"PolicyDocument": {
|
|
656
|
+
"Statement": [
|
|
657
|
+
{
|
|
652
658
|
"Action": "sqs:SendMessage",
|
|
653
|
-
"Condition":
|
|
654
|
-
"ArnEquals":
|
|
655
|
-
"aws:SourceArn":
|
|
659
|
+
"Condition": {
|
|
660
|
+
"ArnEquals": {
|
|
661
|
+
"aws:SourceArn": {
|
|
656
662
|
"Ref": "topic69831491",
|
|
657
663
|
},
|
|
658
664
|
},
|
|
659
665
|
},
|
|
660
666
|
"Effect": "Allow",
|
|
661
|
-
"Principal":
|
|
667
|
+
"Principal": {
|
|
662
668
|
"Service": "sns.amazonaws.com",
|
|
663
669
|
},
|
|
664
|
-
"Resource":
|
|
665
|
-
"Fn::GetAtt":
|
|
670
|
+
"Resource": {
|
|
671
|
+
"Fn::GetAtt": [
|
|
666
672
|
"workerqueueA05CE5C6",
|
|
667
673
|
"Arn",
|
|
668
674
|
],
|
|
@@ -671,34 +677,34 @@ Object {
|
|
|
671
677
|
],
|
|
672
678
|
"Version": "2012-10-17",
|
|
673
679
|
},
|
|
674
|
-
"Queues":
|
|
675
|
-
|
|
680
|
+
"Queues": [
|
|
681
|
+
{
|
|
676
682
|
"Ref": "workerqueueA05CE5C6",
|
|
677
683
|
},
|
|
678
684
|
],
|
|
679
685
|
},
|
|
680
686
|
"Type": "AWS::SQS::QueuePolicy",
|
|
681
687
|
},
|
|
682
|
-
"workerqueueappStacktopic0CA45134AFB31FF4":
|
|
683
|
-
"Properties":
|
|
684
|
-
"Endpoint":
|
|
685
|
-
"Fn::GetAtt":
|
|
688
|
+
"workerqueueappStacktopic0CA45134AFB31FF4": {
|
|
689
|
+
"Properties": {
|
|
690
|
+
"Endpoint": {
|
|
691
|
+
"Fn::GetAtt": [
|
|
686
692
|
"workerqueueA05CE5C6",
|
|
687
693
|
"Arn",
|
|
688
694
|
],
|
|
689
695
|
},
|
|
690
696
|
"Protocol": "sqs",
|
|
691
|
-
"TopicArn":
|
|
697
|
+
"TopicArn": {
|
|
692
698
|
"Ref": "topic69831491",
|
|
693
699
|
},
|
|
694
700
|
},
|
|
695
701
|
"Type": "AWS::SNS::Subscription",
|
|
696
702
|
},
|
|
697
|
-
"workerqueuedlq42262778":
|
|
703
|
+
"workerqueuedlq42262778": {
|
|
698
704
|
"DeletionPolicy": "Delete",
|
|
699
|
-
"Properties":
|
|
700
|
-
"KmsMasterKeyId":
|
|
701
|
-
"Fn::GetAtt":
|
|
705
|
+
"Properties": {
|
|
706
|
+
"KmsMasterKeyId": {
|
|
707
|
+
"Fn::GetAtt": [
|
|
702
708
|
"kmskey49FBC3B3",
|
|
703
709
|
"Arn",
|
|
704
710
|
],
|