@mavogel/cdk-vscode-server 0.0.18 → 0.0.19
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/.jsii +3 -3
- package/CONTRIBUTING.md +5 -5
- package/README.md +1 -1
- package/integ-tests/integ.al2023.ts.snapshot/IntegSetupVSCodeOnAl2023DefaultTestDeployAssert74D8F645.assets.json +6 -6
- package/integ-tests/integ.al2023.ts.snapshot/IntegSetupVSCodeOnAl2023DefaultTestDeployAssert74D8F645.template.json +2 -2
- package/integ-tests/integ.al2023.ts.snapshot/IntegTestStackAl2023.assets.json +12 -12
- package/integ-tests/integ.al2023.ts.snapshot/IntegTestStackAl2023.template.json +307 -23
- package/integ-tests/integ.al2023.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
- package/integ-tests/integ.al2023.ts.snapshot/{asset.512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf.lambda → asset.a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.lambda}/index.js +28 -9
- package/integ-tests/integ.al2023.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
- package/integ-tests/{integ.ubuntu.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → integ.al2023.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/outbound.js +1 -1
- package/integ-tests/integ.al2023.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
- package/integ-tests/{integ.ubuntu.ts.snapshot/asset.c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d.bundle → integ.al2023.ts.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle}/index.js +42 -43
- package/integ-tests/integ.al2023.ts.snapshot/cdk.out +1 -1
- package/integ-tests/integ.al2023.ts.snapshot/integ.json +2 -2
- package/integ-tests/integ.al2023.ts.snapshot/manifest.json +3 -5
- package/integ-tests/integ.al2023.ts.snapshot/tree.json +453 -169
- package/integ-tests/integ.ubuntu.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.assets.json +6 -6
- package/integ-tests/integ.ubuntu.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.template.json +2 -2
- package/integ-tests/integ.ubuntu.ts.snapshot/IntegTestStackUbuntu22.assets.json +12 -12
- package/integ-tests/integ.ubuntu.ts.snapshot/IntegTestStackUbuntu22.template.json +131 -23
- package/integ-tests/integ.ubuntu.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
- package/integ-tests/integ.ubuntu.ts.snapshot/{asset.512cf155ada4793b37a885c1aa6d9bb8f534e88bac6f63c69672d4d73df2decf.lambda → asset.a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.lambda}/index.js +28 -9
- package/integ-tests/integ.ubuntu.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
- package/integ-tests/{integ.al2023.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → integ.ubuntu.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/outbound.js +1 -1
- package/integ-tests/integ.ubuntu.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
- package/integ-tests/{integ.al2023.ts.snapshot/asset.c504585dae89ce8e394d7744ccae054318e7d1aff14afb545438d173d51dc97d.bundle → integ.ubuntu.ts.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle}/index.js +42 -43
- package/integ-tests/integ.ubuntu.ts.snapshot/cdk.out +1 -1
- package/integ-tests/integ.ubuntu.ts.snapshot/integ.json +2 -2
- package/integ-tests/integ.ubuntu.ts.snapshot/manifest.json +3 -5
- package/integ-tests/integ.ubuntu.ts.snapshot/tree.json +277 -169
- package/lib/vscode-server.js +1 -1
- package/mavogelcdkvscodeserver/README.md +1 -1
- package/mavogelcdkvscodeserver/VSCodeServerProps.go +4 -0
- package/mavogelcdkvscodeserver/jsii/jsii.go +2 -2
- package/mavogelcdkvscodeserver/version +1 -1
- package/package.json +1 -1
- package/integ-tests/integ.al2023.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js +0 -1
- package/integ-tests/integ.al2023.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js +0 -1
- package/integ-tests/integ.al2023.ts.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
- package/integ-tests/integ.ubuntu.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/cfn-response.js +0 -1
- package/integ-tests/integ.ubuntu.ts.snapshot/asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e/util.js +0 -1
- package/integ-tests/integ.ubuntu.ts.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
- /package/integ-tests/integ.al2023.ts.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
- /package/integ-tests/integ.al2023.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/consts.js +0 -0
- /package/integ-tests/integ.al2023.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/framework.js +0 -0
- /package/integ-tests/integ.ubuntu.ts.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
- /package/integ-tests/integ.ubuntu.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/consts.js +0 -0
- /package/integ-tests/integ.ubuntu.ts.snapshot/{asset.4dc48ffba382f93077a1e6824599bbd4ceb6f91eb3d9442eca3b85bdb1a20b1e → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/framework.js +0 -0
|
@@ -10,7 +10,21 @@
|
|
|
10
10
|
"IncludeSpace": false,
|
|
11
11
|
"PasswordLength": 16,
|
|
12
12
|
"SecretStringTemplate": "{\"username\":\"participant\"}"
|
|
13
|
-
}
|
|
13
|
+
},
|
|
14
|
+
"Tags": [
|
|
15
|
+
{
|
|
16
|
+
"Key": "app",
|
|
17
|
+
"Value": "vscode-server"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"Key": "Environement",
|
|
21
|
+
"Value": "IntegTestAl2023"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"Key": "IntegTest",
|
|
25
|
+
"Value": "True"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
14
28
|
},
|
|
15
29
|
"UpdateReplacePolicy": "Delete",
|
|
16
30
|
"DeletionPolicy": "Delete",
|
|
@@ -53,6 +67,20 @@
|
|
|
53
67
|
]
|
|
54
68
|
]
|
|
55
69
|
}
|
|
70
|
+
],
|
|
71
|
+
"Tags": [
|
|
72
|
+
{
|
|
73
|
+
"Key": "app",
|
|
74
|
+
"Value": "vscode-server"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"Key": "Environement",
|
|
78
|
+
"Value": "IntegTestAl2023"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"Key": "IntegTest",
|
|
82
|
+
"Value": "True"
|
|
83
|
+
}
|
|
56
84
|
]
|
|
57
85
|
},
|
|
58
86
|
"Metadata": {
|
|
@@ -103,11 +131,6 @@
|
|
|
103
131
|
"S3Key": "781ab0ab74634cdaf61539ab208ab777829ef07097ac21f95b9e15a3b1eedc1b.zip"
|
|
104
132
|
},
|
|
105
133
|
"Description": "src/secret-retriever/secret-retriever.lambda.ts",
|
|
106
|
-
"Environment": {
|
|
107
|
-
"Variables": {
|
|
108
|
-
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
134
|
"Handler": "index.handler",
|
|
112
135
|
"MemorySize": 128,
|
|
113
136
|
"Role": {
|
|
@@ -116,7 +139,21 @@
|
|
|
116
139
|
"Arn"
|
|
117
140
|
]
|
|
118
141
|
},
|
|
119
|
-
"Runtime": "
|
|
142
|
+
"Runtime": "nodejs22.x",
|
|
143
|
+
"Tags": [
|
|
144
|
+
{
|
|
145
|
+
"Key": "app",
|
|
146
|
+
"Value": "vscode-server"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"Key": "Environement",
|
|
150
|
+
"Value": "IntegTestAl2023"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"Key": "IntegTest",
|
|
154
|
+
"Value": "True"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
120
157
|
"Timeout": 10
|
|
121
158
|
},
|
|
122
159
|
"DependsOn": [
|
|
@@ -166,6 +203,20 @@
|
|
|
166
203
|
]
|
|
167
204
|
]
|
|
168
205
|
}
|
|
206
|
+
],
|
|
207
|
+
"Tags": [
|
|
208
|
+
{
|
|
209
|
+
"Key": "app",
|
|
210
|
+
"Value": "vscode-server"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"Key": "Environement",
|
|
214
|
+
"Value": "IntegTestAl2023"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"Key": "IntegTest",
|
|
218
|
+
"Value": "True"
|
|
219
|
+
}
|
|
169
220
|
]
|
|
170
221
|
},
|
|
171
222
|
"Metadata": {
|
|
@@ -254,7 +305,7 @@
|
|
|
254
305
|
"S3Bucket": {
|
|
255
306
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
256
307
|
},
|
|
257
|
-
"S3Key": "
|
|
308
|
+
"S3Key": "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca.zip"
|
|
258
309
|
},
|
|
259
310
|
"Description": "AWS CDK resource provider framework - onEvent (IntegTestStackAl2023/IntegVSCodeServer/SecretRetrieveProvider)",
|
|
260
311
|
"Environment": {
|
|
@@ -283,6 +334,20 @@
|
|
|
283
334
|
"value"
|
|
284
335
|
]
|
|
285
336
|
},
|
|
337
|
+
"Tags": [
|
|
338
|
+
{
|
|
339
|
+
"Key": "app",
|
|
340
|
+
"Value": "vscode-server"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"Key": "Environement",
|
|
344
|
+
"Value": "IntegTestAl2023"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"Key": "IntegTest",
|
|
348
|
+
"Value": "True"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
286
351
|
"Timeout": 900
|
|
287
352
|
},
|
|
288
353
|
"DependsOn": [
|
|
@@ -317,10 +382,10 @@
|
|
|
317
382
|
"Arn"
|
|
318
383
|
]
|
|
319
384
|
},
|
|
385
|
+
"ServiceTimeout": 305,
|
|
320
386
|
"SecretArn": {
|
|
321
387
|
"Ref": "IntegVSCodeServerpasswordsecret202A5DB3"
|
|
322
|
-
}
|
|
323
|
-
"ServiceTimeout": 305
|
|
388
|
+
}
|
|
324
389
|
},
|
|
325
390
|
"UpdateReplacePolicy": "Delete",
|
|
326
391
|
"DeletionPolicy": "Delete"
|
|
@@ -333,6 +398,18 @@
|
|
|
333
398
|
"EnableDnsSupport": true,
|
|
334
399
|
"InstanceTenancy": "default",
|
|
335
400
|
"Tags": [
|
|
401
|
+
{
|
|
402
|
+
"Key": "app",
|
|
403
|
+
"Value": "vscode-server"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"Key": "Environement",
|
|
407
|
+
"Value": "IntegTestAl2023"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"Key": "IntegTest",
|
|
411
|
+
"Value": "True"
|
|
412
|
+
},
|
|
336
413
|
{
|
|
337
414
|
"Key": "Name",
|
|
338
415
|
"Value": "IntegTestStackAl2023/IntegVSCodeServer/vpc"
|
|
@@ -364,6 +441,10 @@
|
|
|
364
441
|
"CidrBlock": "10.0.0.0/17",
|
|
365
442
|
"MapPublicIpOnLaunch": true,
|
|
366
443
|
"Tags": [
|
|
444
|
+
{
|
|
445
|
+
"Key": "app",
|
|
446
|
+
"Value": "vscode-server"
|
|
447
|
+
},
|
|
367
448
|
{
|
|
368
449
|
"Key": "aws-cdk:subnet-name",
|
|
369
450
|
"Value": "public"
|
|
@@ -372,6 +453,14 @@
|
|
|
372
453
|
"Key": "aws-cdk:subnet-type",
|
|
373
454
|
"Value": "Public"
|
|
374
455
|
},
|
|
456
|
+
{
|
|
457
|
+
"Key": "Environement",
|
|
458
|
+
"Value": "IntegTestAl2023"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"Key": "IntegTest",
|
|
462
|
+
"Value": "True"
|
|
463
|
+
},
|
|
375
464
|
{
|
|
376
465
|
"Key": "Name",
|
|
377
466
|
"Value": "IntegTestStackAl2023/IntegVSCodeServer/vpc/publicSubnet1"
|
|
@@ -396,6 +485,18 @@
|
|
|
396
485
|
"Type": "AWS::EC2::RouteTable",
|
|
397
486
|
"Properties": {
|
|
398
487
|
"Tags": [
|
|
488
|
+
{
|
|
489
|
+
"Key": "app",
|
|
490
|
+
"Value": "vscode-server"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"Key": "Environement",
|
|
494
|
+
"Value": "IntegTestAl2023"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"Key": "IntegTest",
|
|
498
|
+
"Value": "True"
|
|
499
|
+
},
|
|
399
500
|
{
|
|
400
501
|
"Key": "Name",
|
|
401
502
|
"Value": "IntegTestStackAl2023/IntegVSCodeServer/vpc/publicSubnet1"
|
|
@@ -476,6 +577,10 @@
|
|
|
476
577
|
"CidrBlock": "10.0.128.0/17",
|
|
477
578
|
"MapPublicIpOnLaunch": true,
|
|
478
579
|
"Tags": [
|
|
580
|
+
{
|
|
581
|
+
"Key": "app",
|
|
582
|
+
"Value": "vscode-server"
|
|
583
|
+
},
|
|
479
584
|
{
|
|
480
585
|
"Key": "aws-cdk:subnet-name",
|
|
481
586
|
"Value": "public"
|
|
@@ -484,6 +589,14 @@
|
|
|
484
589
|
"Key": "aws-cdk:subnet-type",
|
|
485
590
|
"Value": "Public"
|
|
486
591
|
},
|
|
592
|
+
{
|
|
593
|
+
"Key": "Environement",
|
|
594
|
+
"Value": "IntegTestAl2023"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"Key": "IntegTest",
|
|
598
|
+
"Value": "True"
|
|
599
|
+
},
|
|
487
600
|
{
|
|
488
601
|
"Key": "Name",
|
|
489
602
|
"Value": "IntegTestStackAl2023/IntegVSCodeServer/vpc/publicSubnet2"
|
|
@@ -508,6 +621,18 @@
|
|
|
508
621
|
"Type": "AWS::EC2::RouteTable",
|
|
509
622
|
"Properties": {
|
|
510
623
|
"Tags": [
|
|
624
|
+
{
|
|
625
|
+
"Key": "app",
|
|
626
|
+
"Value": "vscode-server"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"Key": "Environement",
|
|
630
|
+
"Value": "IntegTestAl2023"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"Key": "IntegTest",
|
|
634
|
+
"Value": "True"
|
|
635
|
+
},
|
|
511
636
|
{
|
|
512
637
|
"Key": "Name",
|
|
513
638
|
"Value": "IntegTestStackAl2023/IntegVSCodeServer/vpc/publicSubnet2"
|
|
@@ -578,6 +703,18 @@
|
|
|
578
703
|
"Type": "AWS::EC2::InternetGateway",
|
|
579
704
|
"Properties": {
|
|
580
705
|
"Tags": [
|
|
706
|
+
{
|
|
707
|
+
"Key": "app",
|
|
708
|
+
"Value": "vscode-server"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"Key": "Environement",
|
|
712
|
+
"Value": "IntegTestAl2023"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"Key": "IntegTest",
|
|
716
|
+
"Value": "True"
|
|
717
|
+
},
|
|
581
718
|
{
|
|
582
719
|
"Key": "Name",
|
|
583
720
|
"Value": "IntegTestStackAl2023/IntegVSCodeServer/vpc"
|
|
@@ -660,6 +797,20 @@
|
|
|
660
797
|
"IpProtocol": "-1"
|
|
661
798
|
}
|
|
662
799
|
],
|
|
800
|
+
"Tags": [
|
|
801
|
+
{
|
|
802
|
+
"Key": "app",
|
|
803
|
+
"Value": "vscode-server"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"Key": "Environement",
|
|
807
|
+
"Value": "IntegTestAl2023"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"Key": "IntegTest",
|
|
811
|
+
"Value": "True"
|
|
812
|
+
}
|
|
813
|
+
],
|
|
663
814
|
"VpcId": {
|
|
664
815
|
"Ref": "IntegVSCodeServervpc93DDE887"
|
|
665
816
|
}
|
|
@@ -689,7 +840,21 @@
|
|
|
689
840
|
"IntegVSCodeServercfprefixlistIdGetPrefixListIdLogGroup171C2803": {
|
|
690
841
|
"Type": "AWS::Logs::LogGroup",
|
|
691
842
|
"Properties": {
|
|
692
|
-
"RetentionInDays": 1
|
|
843
|
+
"RetentionInDays": 1,
|
|
844
|
+
"Tags": [
|
|
845
|
+
{
|
|
846
|
+
"Key": "app",
|
|
847
|
+
"Value": "vscode-server"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"Key": "Environement",
|
|
851
|
+
"Value": "IntegTestAl2023"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"Key": "IntegTest",
|
|
855
|
+
"Value": "True"
|
|
856
|
+
}
|
|
857
|
+
]
|
|
693
858
|
},
|
|
694
859
|
"UpdateReplacePolicy": "Delete",
|
|
695
860
|
"DeletionPolicy": "Delete",
|
|
@@ -718,7 +883,21 @@
|
|
|
718
883
|
}
|
|
719
884
|
],
|
|
720
885
|
"Version": "2012-10-17"
|
|
721
|
-
}
|
|
886
|
+
},
|
|
887
|
+
"Tags": [
|
|
888
|
+
{
|
|
889
|
+
"Key": "app",
|
|
890
|
+
"Value": "vscode-server"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"Key": "Environement",
|
|
894
|
+
"Value": "IntegTestAl2023"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"Key": "IntegTest",
|
|
898
|
+
"Value": "True"
|
|
899
|
+
}
|
|
900
|
+
]
|
|
722
901
|
},
|
|
723
902
|
"Metadata": {
|
|
724
903
|
"cdk_nag": {
|
|
@@ -1050,6 +1229,20 @@
|
|
|
1050
1229
|
},
|
|
1051
1230
|
"PolicyName": "VSCodeInstanceInlinePolicy"
|
|
1052
1231
|
}
|
|
1232
|
+
],
|
|
1233
|
+
"Tags": [
|
|
1234
|
+
{
|
|
1235
|
+
"Key": "app",
|
|
1236
|
+
"Value": "vscode-server"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"Key": "Environement",
|
|
1240
|
+
"Value": "IntegTestAl2023"
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"Key": "IntegTest",
|
|
1244
|
+
"Value": "True"
|
|
1245
|
+
}
|
|
1053
1246
|
]
|
|
1054
1247
|
},
|
|
1055
1248
|
"Metadata": {
|
|
@@ -1144,6 +1337,18 @@
|
|
|
1144
1337
|
}
|
|
1145
1338
|
],
|
|
1146
1339
|
"Tags": [
|
|
1340
|
+
{
|
|
1341
|
+
"Key": "app",
|
|
1342
|
+
"Value": "vscode-server"
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"Key": "Environement",
|
|
1346
|
+
"Value": "IntegTestAl2023"
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"Key": "IntegTest",
|
|
1350
|
+
"Value": "True"
|
|
1351
|
+
},
|
|
1147
1352
|
{
|
|
1148
1353
|
"Key": "Name",
|
|
1149
1354
|
"Value": "VSCodeServer"
|
|
@@ -1281,7 +1486,21 @@
|
|
|
1281
1486
|
}
|
|
1282
1487
|
],
|
|
1283
1488
|
"PriceClass": "PriceClass_All"
|
|
1284
|
-
}
|
|
1489
|
+
},
|
|
1490
|
+
"Tags": [
|
|
1491
|
+
{
|
|
1492
|
+
"Key": "app",
|
|
1493
|
+
"Value": "vscode-server"
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
"Key": "Environement",
|
|
1497
|
+
"Value": "IntegTestAl2023"
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
"Key": "IntegTest",
|
|
1501
|
+
"Value": "True"
|
|
1502
|
+
}
|
|
1503
|
+
]
|
|
1285
1504
|
},
|
|
1286
1505
|
"Metadata": {
|
|
1287
1506
|
"cdk_nag": {
|
|
@@ -1559,7 +1778,21 @@
|
|
|
1559
1778
|
]
|
|
1560
1779
|
},
|
|
1561
1780
|
"DocumentType": "Command",
|
|
1562
|
-
"Name": "vscode-server-al2023-IntegTestStackAl2023"
|
|
1781
|
+
"Name": "vscode-server-al2023-IntegTestStackAl2023",
|
|
1782
|
+
"Tags": [
|
|
1783
|
+
{
|
|
1784
|
+
"Key": "app",
|
|
1785
|
+
"Value": "vscode-server"
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
"Key": "Environement",
|
|
1789
|
+
"Value": "IntegTestAl2023"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"Key": "IntegTest",
|
|
1793
|
+
"Value": "True"
|
|
1794
|
+
}
|
|
1795
|
+
]
|
|
1563
1796
|
}
|
|
1564
1797
|
},
|
|
1565
1798
|
"IntegVSCodeServerInstallerOnEventHandlerServiceRole59651FEF": {
|
|
@@ -1590,6 +1823,20 @@
|
|
|
1590
1823
|
]
|
|
1591
1824
|
]
|
|
1592
1825
|
}
|
|
1826
|
+
],
|
|
1827
|
+
"Tags": [
|
|
1828
|
+
{
|
|
1829
|
+
"Key": "app",
|
|
1830
|
+
"Value": "vscode-server"
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
"Key": "Environement",
|
|
1834
|
+
"Value": "IntegTestAl2023"
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
"Key": "IntegTest",
|
|
1838
|
+
"Value": "True"
|
|
1839
|
+
}
|
|
1593
1840
|
]
|
|
1594
1841
|
},
|
|
1595
1842
|
"Metadata": {
|
|
@@ -1699,14 +1946,9 @@
|
|
|
1699
1946
|
"S3Bucket": {
|
|
1700
1947
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
1701
1948
|
},
|
|
1702
|
-
"S3Key": "
|
|
1949
|
+
"S3Key": "a9865c9d36c7aa999e28cb7926e7a3a8e0b6d0854b25131a172024c5777442fa.zip"
|
|
1703
1950
|
},
|
|
1704
1951
|
"Description": "src/installer/installer.lambda.ts",
|
|
1705
|
-
"Environment": {
|
|
1706
|
-
"Variables": {
|
|
1707
|
-
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
|
|
1708
|
-
}
|
|
1709
|
-
},
|
|
1710
1952
|
"Handler": "index.handler",
|
|
1711
1953
|
"MemorySize": 512,
|
|
1712
1954
|
"Role": {
|
|
@@ -1715,7 +1957,21 @@
|
|
|
1715
1957
|
"Arn"
|
|
1716
1958
|
]
|
|
1717
1959
|
},
|
|
1718
|
-
"Runtime": "
|
|
1960
|
+
"Runtime": "nodejs22.x",
|
|
1961
|
+
"Tags": [
|
|
1962
|
+
{
|
|
1963
|
+
"Key": "app",
|
|
1964
|
+
"Value": "vscode-server"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"Key": "Environement",
|
|
1968
|
+
"Value": "IntegTestAl2023"
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
"Key": "IntegTest",
|
|
1972
|
+
"Value": "True"
|
|
1973
|
+
}
|
|
1974
|
+
],
|
|
1719
1975
|
"Timeout": 300
|
|
1720
1976
|
},
|
|
1721
1977
|
"DependsOn": [
|
|
@@ -1765,6 +2021,20 @@
|
|
|
1765
2021
|
]
|
|
1766
2022
|
]
|
|
1767
2023
|
}
|
|
2024
|
+
],
|
|
2025
|
+
"Tags": [
|
|
2026
|
+
{
|
|
2027
|
+
"Key": "app",
|
|
2028
|
+
"Value": "vscode-server"
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
"Key": "Environement",
|
|
2032
|
+
"Value": "IntegTestAl2023"
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
"Key": "IntegTest",
|
|
2036
|
+
"Value": "True"
|
|
2037
|
+
}
|
|
1768
2038
|
]
|
|
1769
2039
|
},
|
|
1770
2040
|
"Metadata": {
|
|
@@ -1853,7 +2123,7 @@
|
|
|
1853
2123
|
"S3Bucket": {
|
|
1854
2124
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
1855
2125
|
},
|
|
1856
|
-
"S3Key": "
|
|
2126
|
+
"S3Key": "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca.zip"
|
|
1857
2127
|
},
|
|
1858
2128
|
"Description": "AWS CDK resource provider framework - onEvent (IntegTestStackAl2023/IntegVSCodeServer/InstallerProvider)",
|
|
1859
2129
|
"Environment": {
|
|
@@ -1882,6 +2152,20 @@
|
|
|
1882
2152
|
"value"
|
|
1883
2153
|
]
|
|
1884
2154
|
},
|
|
2155
|
+
"Tags": [
|
|
2156
|
+
{
|
|
2157
|
+
"Key": "app",
|
|
2158
|
+
"Value": "vscode-server"
|
|
2159
|
+
},
|
|
2160
|
+
{
|
|
2161
|
+
"Key": "Environement",
|
|
2162
|
+
"Value": "IntegTestAl2023"
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
"Key": "IntegTest",
|
|
2166
|
+
"Value": "True"
|
|
2167
|
+
}
|
|
2168
|
+
],
|
|
1885
2169
|
"Timeout": 900
|
|
1886
2170
|
},
|
|
1887
2171
|
"DependsOn": [
|
|
@@ -2008,7 +2292,7 @@
|
|
|
2008
2292
|
"S3Bucket": {
|
|
2009
2293
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
2010
2294
|
},
|
|
2011
|
-
"S3Key": "
|
|
2295
|
+
"S3Key": "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200.zip"
|
|
2012
2296
|
},
|
|
2013
2297
|
"Timeout": 900,
|
|
2014
2298
|
"MemorySize": 128,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.external=void 0,exports.handler=handler,exports.withRetries=withRetries;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}
|
|
@@ -50,7 +50,10 @@ var handler = async (event, context) => {
|
|
|
50
50
|
if (resourcePropertiesPartial.PhysicalResourceId) {
|
|
51
51
|
delete resourcePropertiesPartial.PhysicalResourceId;
|
|
52
52
|
}
|
|
53
|
-
console.log(
|
|
53
|
+
console.log(
|
|
54
|
+
"ResourceProperties filtered after: %j",
|
|
55
|
+
resourcePropertiesPartial
|
|
56
|
+
);
|
|
54
57
|
const parameters = {};
|
|
55
58
|
for (const [key, value] of Object.entries(resourcePropertiesPartial)) {
|
|
56
59
|
parameters[key] = [value];
|
|
@@ -58,10 +61,14 @@ var handler = async (event, context) => {
|
|
|
58
61
|
console.log("mapped parameters: %j", parameters);
|
|
59
62
|
let attemptNo = 0;
|
|
60
63
|
let timeRemaining = context.getRemainingTimeInMillis();
|
|
61
|
-
console.log(
|
|
64
|
+
console.log(
|
|
65
|
+
`Running SSM Document '${documentName}' on EC2 instance '${instanceId}'. Logging to '${cloudWatchLogGroupName}' with parameters: '${JSON.stringify(parameters)}'`
|
|
66
|
+
);
|
|
62
67
|
while (true) {
|
|
63
68
|
attemptNo += 1;
|
|
64
|
-
console.log(
|
|
69
|
+
console.log(
|
|
70
|
+
`Attempt: ${attemptNo}. Time Remaining: ${timeRemaining / 1e3}s`
|
|
71
|
+
);
|
|
65
72
|
try {
|
|
66
73
|
const response = await ssm.sendCommand({
|
|
67
74
|
DocumentName: documentName,
|
|
@@ -81,23 +88,35 @@ var handler = async (event, context) => {
|
|
|
81
88
|
case "InProgress":
|
|
82
89
|
timeRemaining = context.getRemainingTimeInMillis();
|
|
83
90
|
if (timeRemaining > SLEEP_MS) {
|
|
84
|
-
console.log(
|
|
91
|
+
console.log(
|
|
92
|
+
`Instance ${instanceId} not ready: 'InProgress'. Sleeping: ${SLEEP_MS / 1e3}s`
|
|
93
|
+
);
|
|
85
94
|
await new Promise((resolve) => setTimeout(resolve, SLEEP_MS));
|
|
86
95
|
break;
|
|
87
96
|
} else {
|
|
88
|
-
throw new Error(
|
|
97
|
+
throw new Error(
|
|
98
|
+
`SSM Document ${documentName} on EC2 instance ${instanceId} timed out while lambda in progress`
|
|
99
|
+
);
|
|
89
100
|
}
|
|
90
101
|
case "Success":
|
|
91
102
|
console.log(`Instance ${instanceId} successfully bootstrapped`);
|
|
92
103
|
return { Data: responseData };
|
|
93
104
|
case "TimedOut":
|
|
94
|
-
throw new Error(
|
|
105
|
+
throw new Error(
|
|
106
|
+
`SSM Document ${documentName} on EC2 instance ${instanceId} timed out`
|
|
107
|
+
);
|
|
95
108
|
case "Cancelled":
|
|
96
|
-
throw new Error(
|
|
109
|
+
throw new Error(
|
|
110
|
+
`SSM Document ${documentName} on EC2 instance ${instanceId} cancelled`
|
|
111
|
+
);
|
|
97
112
|
case "Failed":
|
|
98
|
-
throw new Error(
|
|
113
|
+
throw new Error(
|
|
114
|
+
`SSM Document ${documentName} on EC2 instance ${instanceId} failed`
|
|
115
|
+
);
|
|
99
116
|
default:
|
|
100
|
-
throw new Error(
|
|
117
|
+
throw new Error(
|
|
118
|
+
`SSM Document ${documentName} on EC2 instance ${instanceId} status ${command.Status}`
|
|
119
|
+
);
|
|
101
120
|
}
|
|
102
121
|
return { Data: responseData };
|
|
103
122
|
} catch (error) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Retry=exports.includeStackTraces=exports.MISSING_PHYSICAL_ID_MARKER=exports.CREATE_FAILED_PHYSICAL_ID_MARKER=void 0,exports.submitResponse=submitResponse,exports.safeHandler=safeHandler,exports.redactDataFromPayload=redactDataFromPayload;const url=require("url"),outbound_1=require("./outbound"),util_1=require("./util");exports.CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",exports.MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function submitResponse(status,event,options={}){const json={Status:status,Reason:options.reason||status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||exports.MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:options.noEcho,Data:event.Data},responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;options?.noEcho?(0,util_1.log)("submit redacted response to cloudformation",loggingSafeUrl,redactDataFromPayload(json)):(0,util_1.log)("submit response to cloudformation",loggingSafeUrl,json);const retryOptions={attempts:5,sleep:1e3};await(0,util_1.withRetries)(retryOptions,outbound_1.httpRequest)({hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}},responseBody)}exports.includeStackTraces=!0;function safeHandler(block){return async event=>{if(event.RequestType==="Delete"&&event.PhysicalResourceId===exports.CREATE_FAILED_PHYSICAL_ID_MARKER){(0,util_1.log)("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{await block(event)}catch(e){if(e instanceof Retry)throw(0,util_1.log)("retry requested by handler"),e;event.PhysicalResourceId||(event.RequestType==="Create"?((0,util_1.log)("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),event.PhysicalResourceId=exports.CREATE_FAILED_PHYSICAL_ID_MARKER):(0,util_1.log)(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify({...event,ResponseURL:"..."})}`)),await submitResponse("FAILED",event,{reason:exports.includeStackTraces?e.stack:e.message})}}}function redactDataFromPayload(payload){const redactedPayload=JSON.parse(JSON.stringify(payload));if(redactedPayload.Data){const keys=Object.keys(redactedPayload.Data);for(const key of keys)redactedPayload.Data[key]="*****"}return redactedPayload}class Retry extends Error{}exports.Retry=Retry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.httpRequest=exports.invokeFunction=exports.startExecution=void 0;const https=require("https"),client_lambda_1=require("@aws-sdk/client-lambda"),client_sfn_1=require("@aws-sdk/client-sfn"),FRAMEWORK_HANDLER_TIMEOUT=9e5,awsSdkConfig={httpOptions:{timeout:FRAMEWORK_HANDLER_TIMEOUT}};async function defaultHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}let sfn,lambda;async function defaultStartExecution(req){return sfn||(sfn=new client_sfn_1.SFN(awsSdkConfig)),sfn.startExecution(req)}async function defaultInvokeFunction(req){lambda||(lambda=new client_lambda_1.Lambda(awsSdkConfig));try{return await lambda.invoke(req)}catch{return await(0,client_lambda_1.waitUntilFunctionActiveV2)({client:lambda,maxWaitTime:300},{FunctionName:req.FunctionName}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.httpRequest=exports.invokeFunction=exports.startExecution=void 0;const https=require("https"),client_lambda_1=require("@aws-sdk/client-lambda"),client_sfn_1=require("@aws-sdk/client-sfn"),FRAMEWORK_HANDLER_TIMEOUT=9e5,awsSdkConfig={httpOptions:{timeout:FRAMEWORK_HANDLER_TIMEOUT}};async function defaultHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}let sfn,lambda;async function defaultStartExecution(req){return sfn||(sfn=new client_sfn_1.SFN(awsSdkConfig)),sfn.startExecution(req)}async function defaultInvokeFunction(req){lambda||(lambda=new client_lambda_1.Lambda(awsSdkConfig));try{return await lambda.invoke(req)}catch{return await(0,client_lambda_1.waitUntilFunctionActiveV2)({client:lambda,maxWaitTime:300},{FunctionName:req.FunctionName}),lambda.invoke(req)}}exports.startExecution=defaultStartExecution,exports.invokeFunction=defaultInvokeFunction,exports.httpRequest=defaultHttpRequest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEnv=getEnv,exports.log=log,exports.withRetries=withRetries,exports.parseJsonPayload=parseJsonPayload;function getEnv(name){const value=process.env[name];if(!value)throw new Error(`The environment variable "${name}" is not defined`);return value}function log(title,...args){console.log("[provider-framework]",title,...args.map(x=>typeof x=="object"?JSON.stringify(x,void 0,2):x))}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}function parseJsonPayload(payload){const text=new TextDecoder().decode(Buffer.from(payload??""));if(!text)return{};try{return JSON.parse(text)}catch{throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`)}}
|