cdk-vscode-server 0.1.0__tar.gz → 0.1.2__tar.gz

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.
Files changed (17) hide show
  1. {cdk_vscode_server-0.1.0/src/cdk_vscode_server.egg-info → cdk_vscode_server-0.1.2}/PKG-INFO +17 -1
  2. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/README.md +16 -0
  3. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/setup.py +2 -2
  4. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/src/cdk_vscode_server/__init__.py +120 -0
  5. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/src/cdk_vscode_server/_jsii/__init__.py +2 -2
  6. cdk_vscode_server-0.1.2/src/cdk_vscode_server/_jsii/cdk-vscode-server@0.1.2.jsii.tgz +0 -0
  7. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2/src/cdk_vscode_server.egg-info}/PKG-INFO +17 -1
  8. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/src/cdk_vscode_server.egg-info/SOURCES.txt +1 -1
  9. cdk_vscode_server-0.1.0/src/cdk_vscode_server/_jsii/cdk-vscode-server@0.1.0.jsii.tgz +0 -0
  10. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/LICENSE +0 -0
  11. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/MANIFEST.in +0 -0
  12. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/pyproject.toml +0 -0
  13. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/setup.cfg +0 -0
  14. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/src/cdk_vscode_server/py.typed +0 -0
  15. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/src/cdk_vscode_server.egg-info/dependency_links.txt +0 -0
  16. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/src/cdk_vscode_server.egg-info/requires.txt +0 -0
  17. {cdk_vscode_server-0.1.0 → cdk_vscode_server-0.1.2}/src/cdk_vscode_server.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cdk-vscode-server
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Running VS Code Server on AWS
5
5
  Home-page: https://github.com/mavogel/cdk-vscode-server.git
6
6
  Author: Manuel Vogel<info@manuel-vogel.de>
@@ -169,6 +169,22 @@ Set the operating system with `instanceOperatingSystem` and the CPU architecture
169
169
 
170
170
  **Upgrading:** `UBUNTU_22` and `UBUNTU_25` were removed; only the two current Ubuntu LTS releases (24.04 and 26.04) are supported, and 25.04 was not an LTS release. If your stack uses either removed value, switch to `UBUNTU_24` or `UBUNTU_26`. Changing the operating system replaces the EC2 instance.
171
171
 
172
+ ### Log Retention
173
+
174
+ Every log group the construct creates expires its logs after 5 days and is deleted together with the stack. That covers the Lambda functions, the custom resource providers and the install output (`/aws/ssm/<document>`). They are deleted after all other resources of the stack, because Lambda delivers its last logs a few seconds late and would recreate an already deleted group without retention. Change both with:
175
+
176
+ ```python
177
+ import { RemovalPolicy } from 'aws-cdk-lib';
178
+ import { RetentionDays } from 'aws-cdk-lib/aws-logs';
179
+
180
+ new VSCodeServer(this, 'vscode', {
181
+ logRetention: RetentionDays.ONE_MONTH, // default: FIVE_DAYS, INFINITE never expires the logs
182
+ logRemovalPolicy: RemovalPolicy.RETAIN, // default: DESTROY, RETAIN keeps the logs after the stack is deleted
183
+ });
184
+ ```
185
+
186
+ **Upgrading:** the Lambda functions now log to log groups of the stack. The groups they used before (`/aws/lambda/<function name>`) are not touched and keep their old retention; delete them if you do not need the logs. If you have several `VSCodeServer` in one stack, the setting of the first one applies to the shared log group of the VPC default security group provider.
187
+
172
188
  ### Pre-populate with Git Repository
173
189
 
174
190
  Clone a git repository into the VS Code Server's home folder during instance setup - perfect for workshops or development environments with starter code:
@@ -139,6 +139,22 @@ Set the operating system with `instanceOperatingSystem` and the CPU architecture
139
139
 
140
140
  **Upgrading:** `UBUNTU_22` and `UBUNTU_25` were removed; only the two current Ubuntu LTS releases (24.04 and 26.04) are supported, and 25.04 was not an LTS release. If your stack uses either removed value, switch to `UBUNTU_24` or `UBUNTU_26`. Changing the operating system replaces the EC2 instance.
141
141
 
142
+ ### Log Retention
143
+
144
+ Every log group the construct creates expires its logs after 5 days and is deleted together with the stack. That covers the Lambda functions, the custom resource providers and the install output (`/aws/ssm/<document>`). They are deleted after all other resources of the stack, because Lambda delivers its last logs a few seconds late and would recreate an already deleted group without retention. Change both with:
145
+
146
+ ```python
147
+ import { RemovalPolicy } from 'aws-cdk-lib';
148
+ import { RetentionDays } from 'aws-cdk-lib/aws-logs';
149
+
150
+ new VSCodeServer(this, 'vscode', {
151
+ logRetention: RetentionDays.ONE_MONTH, // default: FIVE_DAYS, INFINITE never expires the logs
152
+ logRemovalPolicy: RemovalPolicy.RETAIN, // default: DESTROY, RETAIN keeps the logs after the stack is deleted
153
+ });
154
+ ```
155
+
156
+ **Upgrading:** the Lambda functions now log to log groups of the stack. The groups they used before (`/aws/lambda/<function name>`) are not touched and keep their old retention; delete them if you do not need the logs. If you have several `VSCodeServer` in one stack, the setting of the first one applies to the shared log group of the VPC default security group provider.
157
+
142
158
  ### Pre-populate with Git Repository
143
159
 
144
160
  Clone a git repository into the VS Code Server's home folder during instance setup - perfect for workshops or development environments with starter code:
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "cdk-vscode-server",
8
- "version": "0.1.0",
8
+ "version": "0.1.2",
9
9
  "description": "Running VS Code Server on AWS",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/mavogel/cdk-vscode-server.git",
@@ -26,7 +26,7 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "cdk_vscode_server._jsii": [
29
- "cdk-vscode-server@0.1.0.jsii.tgz"
29
+ "cdk-vscode-server@0.1.2.jsii.tgz"
30
30
  ],
31
31
  "cdk_vscode_server": [
32
32
  "py.typed"
@@ -140,6 +140,22 @@ Set the operating system with `instanceOperatingSystem` and the CPU architecture
140
140
 
141
141
  **Upgrading:** `UBUNTU_22` and `UBUNTU_25` were removed; only the two current Ubuntu LTS releases (24.04 and 26.04) are supported, and 25.04 was not an LTS release. If your stack uses either removed value, switch to `UBUNTU_24` or `UBUNTU_26`. Changing the operating system replaces the EC2 instance.
142
142
 
143
+ ### Log Retention
144
+
145
+ Every log group the construct creates expires its logs after 5 days and is deleted together with the stack. That covers the Lambda functions, the custom resource providers and the install output (`/aws/ssm/<document>`). They are deleted after all other resources of the stack, because Lambda delivers its last logs a few seconds late and would recreate an already deleted group without retention. Change both with:
146
+
147
+ ```python
148
+ import { RemovalPolicy } from 'aws-cdk-lib';
149
+ import { RetentionDays } from 'aws-cdk-lib/aws-logs';
150
+
151
+ new VSCodeServer(this, 'vscode', {
152
+ logRetention: RetentionDays.ONE_MONTH, // default: FIVE_DAYS, INFINITE never expires the logs
153
+ logRemovalPolicy: RemovalPolicy.RETAIN, // default: DESTROY, RETAIN keeps the logs after the stack is deleted
154
+ });
155
+ ```
156
+
157
+ **Upgrading:** the Lambda functions now log to log groups of the stack. The groups they used before (`/aws/lambda/<function name>`) are not touched and keep their old retention; delete them if you do not need the logs. If you have several `VSCodeServer` in one stack, the setting of the first one applies to the shared log group of the VPC default security group provider.
158
+
143
159
  ### Pre-populate with Git Repository
144
160
 
145
161
  Clone a git repository into the VS Code Server's home folder during instance setup - perfect for workshops or development environments with starter code:
@@ -472,10 +488,12 @@ class _LazyImport:
472
488
 
473
489
  if typing.TYPE_CHECKING:
474
490
 
491
+ import aws_cdk as _aws_cdk_ceddda9d
475
492
  import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
476
493
  import aws_cdk.aws_events as _aws_cdk_aws_events_ceddda9d
477
494
  import aws_cdk.aws_iam as _aws_cdk_aws_iam_ceddda9d
478
495
  import aws_cdk.aws_lambda as _aws_cdk_aws_lambda_ceddda9d
496
+ import aws_cdk.aws_logs as _aws_cdk_aws_logs_ceddda9d
479
497
  import aws_cdk.interfaces.aws_cloudfront as _aws_cdk_interfaces_aws_cloudfront_ceddda9d
480
498
  import aws_cdk.interfaces.aws_ec2 as _aws_cdk_interfaces_aws_ec2_ceddda9d
481
499
  import constructs as _constructs_77d1e7e8
@@ -485,6 +503,8 @@ else:
485
503
  _aws_cdk_aws_events_ceddda9d = _LazyImport("aws_cdk.aws_events")
486
504
  _aws_cdk_aws_iam_ceddda9d = _LazyImport("aws_cdk.aws_iam")
487
505
  _aws_cdk_aws_lambda_ceddda9d = _LazyImport("aws_cdk.aws_lambda")
506
+ _aws_cdk_aws_logs_ceddda9d = _LazyImport("aws_cdk.aws_logs")
507
+ _aws_cdk_ceddda9d = _LazyImport("aws_cdk")
488
508
  _aws_cdk_interfaces_aws_cloudfront_ceddda9d = _LazyImport("aws_cdk.interfaces.aws_cloudfront")
489
509
  _aws_cdk_interfaces_aws_ec2_ceddda9d = _LazyImport("aws_cdk.interfaces.aws_ec2")
490
510
  _constructs_77d1e7e8 = _LazyImport("constructs")
@@ -577,6 +597,8 @@ class IdleMonitor(
577
597
  idle_timeout_minutes: jsii.Number,
578
598
  instance: "_aws_cdk_interfaces_aws_ec2_ceddda9d.IInstanceRef",
579
599
  check_interval_minutes: typing.Optional[jsii.Number] = None,
600
+ log_removal_policy: typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"] = None,
601
+ log_retention: typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"] = None,
580
602
  skip_status_checks: typing.Optional[builtins.bool] = None,
581
603
  ) -> None:
582
604
  '''
@@ -586,6 +608,8 @@ class IdleMonitor(
586
608
  :param idle_timeout_minutes: (experimental) Number of minutes of inactivity before stopping the instance.
587
609
  :param instance: (experimental) The EC2 instance to monitor.
588
610
  :param check_interval_minutes: (experimental) How often to check for idle activity (in minutes). Default: 5 - Check every 5 minutes
611
+ :param log_removal_policy: (experimental) What happens to the log groups when the stack is deleted. Default: RemovalPolicy.DESTROY
612
+ :param log_retention: (experimental) How long the logs of the monitoring Lambda function are kept. Default: RetentionDays.FIVE_DAYS
589
613
  :param skip_status_checks: (experimental) Skip instance status checks before stopping When true, IdleMonitor will stop idle instances even if status checks haven't passed This is useful for integration tests where status check initialization time exceeds test timeout limits. WARNING: For testing only - in production, you should wait for status checks to pass before stopping instances Default: false
590
614
 
591
615
  :stability: experimental
@@ -599,6 +623,8 @@ class IdleMonitor(
599
623
  idle_timeout_minutes=idle_timeout_minutes,
600
624
  instance=instance,
601
625
  check_interval_minutes=check_interval_minutes,
626
+ log_removal_policy=log_removal_policy,
627
+ log_retention=log_retention,
602
628
  skip_status_checks=skip_status_checks,
603
629
  )
604
630
 
@@ -631,6 +657,8 @@ class IdleMonitor(
631
657
  "idle_timeout_minutes": "idleTimeoutMinutes",
632
658
  "instance": "instance",
633
659
  "check_interval_minutes": "checkIntervalMinutes",
660
+ "log_removal_policy": "logRemovalPolicy",
661
+ "log_retention": "logRetention",
634
662
  "skip_status_checks": "skipStatusChecks",
635
663
  },
636
664
  )
@@ -642,6 +670,8 @@ class IdleMonitorProps:
642
670
  idle_timeout_minutes: jsii.Number,
643
671
  instance: "_aws_cdk_interfaces_aws_ec2_ceddda9d.IInstanceRef",
644
672
  check_interval_minutes: typing.Optional[jsii.Number] = None,
673
+ log_removal_policy: typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"] = None,
674
+ log_retention: typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"] = None,
645
675
  skip_status_checks: typing.Optional[builtins.bool] = None,
646
676
  ) -> None:
647
677
  '''(experimental) Props for IdleMonitor construct.
@@ -650,6 +680,8 @@ class IdleMonitorProps:
650
680
  :param idle_timeout_minutes: (experimental) Number of minutes of inactivity before stopping the instance.
651
681
  :param instance: (experimental) The EC2 instance to monitor.
652
682
  :param check_interval_minutes: (experimental) How often to check for idle activity (in minutes). Default: 5 - Check every 5 minutes
683
+ :param log_removal_policy: (experimental) What happens to the log groups when the stack is deleted. Default: RemovalPolicy.DESTROY
684
+ :param log_retention: (experimental) How long the logs of the monitoring Lambda function are kept. Default: RetentionDays.FIVE_DAYS
653
685
  :param skip_status_checks: (experimental) Skip instance status checks before stopping When true, IdleMonitor will stop idle instances even if status checks haven't passed This is useful for integration tests where status check initialization time exceeds test timeout limits. WARNING: For testing only - in production, you should wait for status checks to pass before stopping instances Default: false
654
686
 
655
687
  :stability: experimental
@@ -660,6 +692,8 @@ class IdleMonitorProps:
660
692
  check_type(argname="argument idle_timeout_minutes", value=idle_timeout_minutes, expected_type=type_hints["idle_timeout_minutes"])
661
693
  check_type(argname="argument instance", value=instance, expected_type=type_hints["instance"])
662
694
  check_type(argname="argument check_interval_minutes", value=check_interval_minutes, expected_type=type_hints["check_interval_minutes"])
695
+ check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
696
+ check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
663
697
  check_type(argname="argument skip_status_checks", value=skip_status_checks, expected_type=type_hints["skip_status_checks"])
664
698
  self._values: typing.Dict[builtins.str, typing.Any] = {
665
699
  "distribution": distribution,
@@ -668,6 +702,10 @@ class IdleMonitorProps:
668
702
  }
669
703
  if check_interval_minutes is not None:
670
704
  self._values["check_interval_minutes"] = check_interval_minutes
705
+ if log_removal_policy is not None:
706
+ self._values["log_removal_policy"] = log_removal_policy
707
+ if log_retention is not None:
708
+ self._values["log_retention"] = log_retention
671
709
  if skip_status_checks is not None:
672
710
  self._values["skip_status_checks"] = skip_status_checks
673
711
 
@@ -714,6 +752,30 @@ class IdleMonitorProps:
714
752
  result = self._values.get("check_interval_minutes")
715
753
  return typing.cast(typing.Optional[jsii.Number], result)
716
754
 
755
+ @builtins.property
756
+ def log_removal_policy(self) -> typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"]:
757
+ '''(experimental) What happens to the log groups when the stack is deleted.
758
+
759
+ :default: RemovalPolicy.DESTROY
760
+
761
+ :stability: experimental
762
+ '''
763
+ result = self._values.get("log_removal_policy")
764
+ return typing.cast(typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"], result)
765
+
766
+ @builtins.property
767
+ def log_retention(
768
+ self,
769
+ ) -> typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"]:
770
+ '''(experimental) How long the logs of the monitoring Lambda function are kept.
771
+
772
+ :default: RetentionDays.FIVE_DAYS
773
+
774
+ :stability: experimental
775
+ '''
776
+ result = self._values.get("log_retention")
777
+ return typing.cast(typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"], result)
778
+
717
779
  @builtins.property
718
780
  def skip_status_checks(self) -> typing.Optional[builtins.bool]:
719
781
  '''(experimental) Skip instance status checks before stopping When true, IdleMonitor will stop idle instances even if status checks haven't passed This is useful for integration tests where status check initialization time exceeds test timeout limits.
@@ -820,6 +882,8 @@ class VSCodeServer(
820
882
  instance_operating_system: typing.Optional["LinuxFlavorType"] = None,
821
883
  instance_size: typing.Optional["_aws_cdk_aws_ec2_ceddda9d.InstanceSize"] = None,
822
884
  instance_volume_size: typing.Optional[jsii.Number] = None,
885
+ log_removal_policy: typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"] = None,
886
+ log_retention: typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"] = None,
823
887
  repo_url: typing.Optional[builtins.str] = None,
824
888
  skip_status_checks: typing.Optional[builtins.bool] = None,
825
889
  vscode_password: typing.Optional[builtins.str] = None,
@@ -850,6 +914,8 @@ class VSCodeServer(
850
914
  :param instance_operating_system: (experimental) VSCode Server EC2 operating system. Default: - Ubuntu-24
851
915
  :param instance_size: (experimental) VSCode Server EC2 instance size. Default: - xlarge
852
916
  :param instance_volume_size: (experimental) VSCode Server EC2 instance volume size in GB. Default: - 40
917
+ :param log_removal_policy: (experimental) What happens to the log groups the construct creates when the stack is deleted or the log group is replaced. Use ``RemovalPolicy.RETAIN`` to keep the logs. Applies to every log group the construct creates, including the install log group (SSM command output). Supports ``DESTROY`` and ``RETAIN``. Default: RemovalPolicy.DESTROY
918
+ :param log_retention: (experimental) How long the logs of the Lambda functions, the custom resource providers and the installation (SSM command output) are kept. Applies to every log group the construct creates. They are deleted together with the stack. Use ``RetentionDays.INFINITE`` to never expire the logs. Default: RetentionDays.FIVE_DAYS
853
919
  :param repo_url: (experimental) Remote git repository URL to clone into the home folder. If provided, the repository will be cloned into the user's home folder during instance setup. Useful for pre-populating workshop environments with starter code. Default: - no repo cloned
854
920
  :param skip_status_checks: (experimental) Skip instance status checks in IdleMonitor When true, IdleMonitor will stop idle instances even if status checks haven't passed This is useful for integration tests where status check initialization time exceeds the test timeout limits. WARNING: For testing only - in production, you should wait for status checks to pass before stopping instances to avoid stopping unhealthy instances Default: false
855
921
  :param vscode_password: (experimental) Password for VSCode Server. Default: - empty and will then be generated
@@ -884,6 +950,8 @@ class VSCodeServer(
884
950
  instance_operating_system=instance_operating_system,
885
951
  instance_size=instance_size,
886
952
  instance_volume_size=instance_volume_size,
953
+ log_removal_policy=log_removal_policy,
954
+ log_retention=log_retention,
887
955
  repo_url=repo_url,
888
956
  skip_status_checks=skip_status_checks,
889
957
  vscode_password=vscode_password,
@@ -955,6 +1023,8 @@ class VSCodeServer(
955
1023
  "instance_operating_system": "instanceOperatingSystem",
956
1024
  "instance_size": "instanceSize",
957
1025
  "instance_volume_size": "instanceVolumeSize",
1026
+ "log_removal_policy": "logRemovalPolicy",
1027
+ "log_retention": "logRetention",
958
1028
  "repo_url": "repoUrl",
959
1029
  "skip_status_checks": "skipStatusChecks",
960
1030
  "vscode_password": "vscodePassword",
@@ -987,6 +1057,8 @@ class VSCodeServerProps:
987
1057
  instance_operating_system: typing.Optional["LinuxFlavorType"] = None,
988
1058
  instance_size: typing.Optional["_aws_cdk_aws_ec2_ceddda9d.InstanceSize"] = None,
989
1059
  instance_volume_size: typing.Optional[jsii.Number] = None,
1060
+ log_removal_policy: typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"] = None,
1061
+ log_retention: typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"] = None,
990
1062
  repo_url: typing.Optional[builtins.str] = None,
991
1063
  skip_status_checks: typing.Optional[builtins.bool] = None,
992
1064
  vscode_password: typing.Optional[builtins.str] = None,
@@ -1016,6 +1088,8 @@ class VSCodeServerProps:
1016
1088
  :param instance_operating_system: (experimental) VSCode Server EC2 operating system. Default: - Ubuntu-24
1017
1089
  :param instance_size: (experimental) VSCode Server EC2 instance size. Default: - xlarge
1018
1090
  :param instance_volume_size: (experimental) VSCode Server EC2 instance volume size in GB. Default: - 40
1091
+ :param log_removal_policy: (experimental) What happens to the log groups the construct creates when the stack is deleted or the log group is replaced. Use ``RemovalPolicy.RETAIN`` to keep the logs. Applies to every log group the construct creates, including the install log group (SSM command output). Supports ``DESTROY`` and ``RETAIN``. Default: RemovalPolicy.DESTROY
1092
+ :param log_retention: (experimental) How long the logs of the Lambda functions, the custom resource providers and the installation (SSM command output) are kept. Applies to every log group the construct creates. They are deleted together with the stack. Use ``RetentionDays.INFINITE`` to never expire the logs. Default: RetentionDays.FIVE_DAYS
1019
1093
  :param repo_url: (experimental) Remote git repository URL to clone into the home folder. If provided, the repository will be cloned into the user's home folder during instance setup. Useful for pre-populating workshop environments with starter code. Default: - no repo cloned
1020
1094
  :param skip_status_checks: (experimental) Skip instance status checks in IdleMonitor When true, IdleMonitor will stop idle instances even if status checks haven't passed This is useful for integration tests where status check initialization time exceeds the test timeout limits. WARNING: For testing only - in production, you should wait for status checks to pass before stopping instances to avoid stopping unhealthy instances Default: false
1021
1095
  :param vscode_password: (experimental) Password for VSCode Server. Default: - empty and will then be generated
@@ -1047,6 +1121,8 @@ class VSCodeServerProps:
1047
1121
  check_type(argname="argument instance_operating_system", value=instance_operating_system, expected_type=type_hints["instance_operating_system"])
1048
1122
  check_type(argname="argument instance_size", value=instance_size, expected_type=type_hints["instance_size"])
1049
1123
  check_type(argname="argument instance_volume_size", value=instance_volume_size, expected_type=type_hints["instance_volume_size"])
1124
+ check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
1125
+ check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
1050
1126
  check_type(argname="argument repo_url", value=repo_url, expected_type=type_hints["repo_url"])
1051
1127
  check_type(argname="argument skip_status_checks", value=skip_status_checks, expected_type=type_hints["skip_status_checks"])
1052
1128
  check_type(argname="argument vscode_password", value=vscode_password, expected_type=type_hints["vscode_password"])
@@ -1096,6 +1172,10 @@ class VSCodeServerProps:
1096
1172
  self._values["instance_size"] = instance_size
1097
1173
  if instance_volume_size is not None:
1098
1174
  self._values["instance_volume_size"] = instance_volume_size
1175
+ if log_removal_policy is not None:
1176
+ self._values["log_removal_policy"] = log_removal_policy
1177
+ if log_retention is not None:
1178
+ self._values["log_retention"] = log_retention
1099
1179
  if repo_url is not None:
1100
1180
  self._values["repo_url"] = repo_url
1101
1181
  if skip_status_checks is not None:
@@ -1403,6 +1483,38 @@ class VSCodeServerProps:
1403
1483
  result = self._values.get("instance_volume_size")
1404
1484
  return typing.cast(typing.Optional[jsii.Number], result)
1405
1485
 
1486
+ @builtins.property
1487
+ def log_removal_policy(self) -> typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"]:
1488
+ '''(experimental) What happens to the log groups the construct creates when the stack is deleted or the log group is replaced.
1489
+
1490
+ Use ``RemovalPolicy.RETAIN`` to keep the logs.
1491
+
1492
+ Applies to every log group the construct creates, including the install log
1493
+ group (SSM command output). Supports ``DESTROY`` and ``RETAIN``.
1494
+
1495
+ :default: RemovalPolicy.DESTROY
1496
+
1497
+ :stability: experimental
1498
+ '''
1499
+ result = self._values.get("log_removal_policy")
1500
+ return typing.cast(typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"], result)
1501
+
1502
+ @builtins.property
1503
+ def log_retention(
1504
+ self,
1505
+ ) -> typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"]:
1506
+ '''(experimental) How long the logs of the Lambda functions, the custom resource providers and the installation (SSM command output) are kept.
1507
+
1508
+ Applies to every log group the construct creates. They are deleted together
1509
+ with the stack. Use ``RetentionDays.INFINITE`` to never expire the logs.
1510
+
1511
+ :default: RetentionDays.FIVE_DAYS
1512
+
1513
+ :stability: experimental
1514
+ '''
1515
+ result = self._values.get("log_retention")
1516
+ return typing.cast(typing.Optional["_aws_cdk_aws_logs_ceddda9d.RetentionDays"], result)
1517
+
1406
1518
  @builtins.property
1407
1519
  def repo_url(self) -> typing.Optional[builtins.str]:
1408
1520
  '''(experimental) Remote git repository URL to clone into the home folder.
@@ -1497,6 +1609,8 @@ def _typecheckingstub__20b577827aba935251db87d8d64ce79318aa5807c34b891715e4a171e
1497
1609
  idle_timeout_minutes: jsii.Number,
1498
1610
  instance: _aws_cdk_interfaces_aws_ec2_ceddda9d.IInstanceRef,
1499
1611
  check_interval_minutes: typing.Optional[jsii.Number] = None,
1612
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
1613
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
1500
1614
  skip_status_checks: typing.Optional[builtins.bool] = None,
1501
1615
  ) -> None:
1502
1616
  """Type checking stubs"""
@@ -1508,6 +1622,8 @@ def _typecheckingstub__dbe3d723d712645d045480dfd02714e4231593f8cb83f7d7c54a22b69
1508
1622
  idle_timeout_minutes: jsii.Number,
1509
1623
  instance: _aws_cdk_interfaces_aws_ec2_ceddda9d.IInstanceRef,
1510
1624
  check_interval_minutes: typing.Optional[jsii.Number] = None,
1625
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
1626
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
1511
1627
  skip_status_checks: typing.Optional[builtins.bool] = None,
1512
1628
  ) -> None:
1513
1629
  """Type checking stubs"""
@@ -1539,6 +1655,8 @@ def _typecheckingstub__13d98894e731d8d5e45fa4088dfd79af04a4cb66cead591188c4ba44d
1539
1655
  instance_operating_system: typing.Optional[LinuxFlavorType] = None,
1540
1656
  instance_size: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceSize] = None,
1541
1657
  instance_volume_size: typing.Optional[jsii.Number] = None,
1658
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
1659
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
1542
1660
  repo_url: typing.Optional[builtins.str] = None,
1543
1661
  skip_status_checks: typing.Optional[builtins.bool] = None,
1544
1662
  vscode_password: typing.Optional[builtins.str] = None,
@@ -1571,6 +1689,8 @@ def _typecheckingstub__2e462747a4e6316ff07a1ca12065fecb7b143031e2052b9b3ed692a4d
1571
1689
  instance_operating_system: typing.Optional[LinuxFlavorType] = None,
1572
1690
  instance_size: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceSize] = None,
1573
1691
  instance_volume_size: typing.Optional[jsii.Number] = None,
1692
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
1693
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
1574
1694
  repo_url: typing.Optional[builtins.str] = None,
1575
1695
  skip_status_checks: typing.Optional[builtins.bool] = None,
1576
1696
  vscode_password: typing.Optional[builtins.str] = None,
@@ -21,9 +21,9 @@ import mvc_projen._jsii
21
21
 
22
22
  __jsii_assembly__ = jsii.JSIIAssembly.load(
23
23
  "@mavogel/cdk-vscode-server",
24
- "0.1.0",
24
+ "0.1.2",
25
25
  __name__[0:-6],
26
- "cdk-vscode-server@0.1.0.jsii.tgz",
26
+ "cdk-vscode-server@0.1.2.jsii.tgz",
27
27
  )
28
28
 
29
29
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cdk-vscode-server
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Running VS Code Server on AWS
5
5
  Home-page: https://github.com/mavogel/cdk-vscode-server.git
6
6
  Author: Manuel Vogel<info@manuel-vogel.de>
@@ -169,6 +169,22 @@ Set the operating system with `instanceOperatingSystem` and the CPU architecture
169
169
 
170
170
  **Upgrading:** `UBUNTU_22` and `UBUNTU_25` were removed; only the two current Ubuntu LTS releases (24.04 and 26.04) are supported, and 25.04 was not an LTS release. If your stack uses either removed value, switch to `UBUNTU_24` or `UBUNTU_26`. Changing the operating system replaces the EC2 instance.
171
171
 
172
+ ### Log Retention
173
+
174
+ Every log group the construct creates expires its logs after 5 days and is deleted together with the stack. That covers the Lambda functions, the custom resource providers and the install output (`/aws/ssm/<document>`). They are deleted after all other resources of the stack, because Lambda delivers its last logs a few seconds late and would recreate an already deleted group without retention. Change both with:
175
+
176
+ ```python
177
+ import { RemovalPolicy } from 'aws-cdk-lib';
178
+ import { RetentionDays } from 'aws-cdk-lib/aws-logs';
179
+
180
+ new VSCodeServer(this, 'vscode', {
181
+ logRetention: RetentionDays.ONE_MONTH, // default: FIVE_DAYS, INFINITE never expires the logs
182
+ logRemovalPolicy: RemovalPolicy.RETAIN, // default: DESTROY, RETAIN keeps the logs after the stack is deleted
183
+ });
184
+ ```
185
+
186
+ **Upgrading:** the Lambda functions now log to log groups of the stack. The groups they used before (`/aws/lambda/<function name>`) are not touched and keep their old retention; delete them if you do not need the logs. If you have several `VSCodeServer` in one stack, the setting of the first one applies to the shared log group of the VPC default security group provider.
187
+
172
188
  ### Pre-populate with Git Repository
173
189
 
174
190
  Clone a git repository into the VS Code Server's home folder during instance setup - perfect for workshops or development environments with starter code:
@@ -11,4 +11,4 @@ src/cdk_vscode_server.egg-info/dependency_links.txt
11
11
  src/cdk_vscode_server.egg-info/requires.txt
12
12
  src/cdk_vscode_server.egg-info/top_level.txt
13
13
  src/cdk_vscode_server/_jsii/__init__.py
14
- src/cdk_vscode_server/_jsii/cdk-vscode-server@0.1.0.jsii.tgz
14
+ src/cdk_vscode_server/_jsii/cdk-vscode-server@0.1.2.jsii.tgz