cdk-factory 0.18.22__py3-none-any.whl → 0.18.25__py3-none-any.whl

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.

Potentially problematic release.


This version of cdk-factory might be problematic. Click here for more details.

@@ -540,38 +540,42 @@ class AutoScalingStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
540
540
  if not instance_refresh_config.get("enabled", False):
541
541
  return
542
542
 
543
- # Configure instance refresh using CDK construct
544
- refresh_prefs = autoscaling.InstanceRefreshPreferences()
543
+ # Get the CloudFormation ASG resource
544
+ cfn_asg = asg.node.default_child
545
+
546
+ # Configure instance refresh using CloudFormation property
547
+ # The correct structure is at the ASG level, not nested
548
+ refresh_config = {
549
+ "Strategy": "Rolling",
550
+ "Preferences": {}
551
+ }
545
552
 
553
+ # Add preferences if configured
546
554
  if "preferences" in instance_refresh_config:
547
555
  preferences = instance_refresh_config["preferences"]
548
556
 
549
- if "skip_matching" in preferences:
550
- refresh_prefs.skip_matching = preferences["skip_matching"]
551
-
552
- if "auto_rollback" in preferences:
553
- refresh_prefs.auto_rollback = preferences["auto_rollback"]
557
+ if "min_healthy_percentage" in preferences:
558
+ refresh_config["Preferences"]["MinHealthyPercentage"] = preferences["min_healthy_percentage"]
554
559
 
555
560
  if "instance_warmup" in preferences:
556
- refresh_prefs.instance_warmup = cdk.Duration.seconds(preferences["instance_warmup"])
561
+ refresh_config["Preferences"]["InstanceWarmup"] = preferences["instance_warmup"]
557
562
 
558
- if "min_healthy_percentage" in preferences:
559
- refresh_prefs.min_healthy_percentage = preferences["min_healthy_percentage"]
563
+ if "skip_matching" in preferences:
564
+ refresh_config["Preferences"]["SkipMatching"] = preferences["skip_matching"]
565
+
566
+ if "auto_rollback" in preferences:
567
+ refresh_config["Preferences"]["AutoRollback"] = preferences["auto_rollback"]
560
568
 
561
- # Apply instance refresh to the ASG
569
+ # Add top-level properties if configured
562
570
  if "min_healthy_percentage" in instance_refresh_config:
563
- refresh_prefs.min_healthy_percentage = instance_refresh_config["min_healthy_percentage"]
571
+ refresh_config["MinHealthyPercentage"] = instance_refresh_config["min_healthy_percentage"]
564
572
 
565
573
  if "instance_warmup" in instance_refresh_config:
566
- refresh_prefs.instance_warmup = cdk.Duration.seconds(instance_refresh_config["instance_warmup"])
567
-
568
- # Set the instance refresh property
569
- asg.instance_refresh = autoscaling.InstanceRefresh(
570
- strategy=autoscaling.InstanceRefreshStrategy.ROLLING,
571
- preferences=refresh_prefs
572
- )
574
+ refresh_config["InstanceWarmup"] = instance_refresh_config["instance_warmup"]
573
575
 
574
- logger.info(f"Configured instance refresh with strategy: ROLLING")
576
+ # Apply instance refresh using CloudFormation property override
577
+ cfn_asg.add_property_override("InstanceRefresh", refresh_config)
578
+ logger.info(f"Configured instance refresh: {refresh_config}")
575
579
 
576
580
 
577
581
  # Backward compatibility alias
cdk_factory/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.18.22"
1
+ __version__ = "0.18.25"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdk_factory
3
- Version: 0.18.22
3
+ Version: 0.18.25
4
4
  Summary: CDK Factory. A QuickStarter and best practices setup for CDK projects
5
5
  Author-email: Eric Wilson <eric.wilson@geekcafe.com>
6
6
  License: MIT License
@@ -2,7 +2,7 @@ cdk_factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  cdk_factory/app.py,sha256=RnX0-pwdTAPAdKJK_j13Zl8anf9zYKBwboR0KA8K8xM,10346
3
3
  cdk_factory/cdk.json,sha256=SKZKhJ2PBpFH78j-F8S3VDYW-lf76--Q2I3ON-ZIQfw,3106
4
4
  cdk_factory/cli.py,sha256=FGbCTS5dYCNsfp-etshzvFlGDCjC28r6rtzYbe7KoHI,6407
5
- cdk_factory/version.py,sha256=pHO6ezOHYwgmmUPh-SrlmFc1Ry9SsxoQkiW3pezfNsI,24
5
+ cdk_factory/version.py,sha256=PZgdjvO3-LlUWKlOch_neGUTL_kEBywqFp8I5GE_xnk,24
6
6
  cdk_factory/builds/README.md,sha256=9BBWd7bXpyKdMU_g2UljhQwrC9i5O_Tvkb6oPvndoZk,90
7
7
  cdk_factory/commands/command_loader.py,sha256=QbLquuP_AdxtlxlDy-2IWCQ6D-7qa58aphnDPtp_uTs,3744
8
8
  cdk_factory/configurations/base_config.py,sha256=eJ3Pl3GWk1jVr_bYQaaWlw4_-ZiFGaiXllI_fOOX1i0,9323
@@ -86,7 +86,7 @@ cdk_factory/stack_library/acm/__init__.py,sha256=4FNRLykblcKZvq_wieYwvv9N_jgrZnJ
86
86
  cdk_factory/stack_library/acm/acm_stack.py,sha256=QJ3GkT17PmWoGkfO5Um02hvrfyJ9HbiPMnclwDP7IbA,5846
87
87
  cdk_factory/stack_library/api_gateway/api_gateway_stack.py,sha256=PvLdGvcopGpLP0FwpfUcfXNiTIfYLTXqrG-TniE38yc,39643
88
88
  cdk_factory/stack_library/auto_scaling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
- cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=9JqDj9KAW6ZsSvOgrXrOtYnlQRtVGy-8odm-8zLnuhE,24112
89
+ cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=6-cXA9BNcAlzEo_3CR0UImkixpGZ2PpcOTDNpcQDAE8,24309
90
90
  cdk_factory/stack_library/aws_lambdas/lambda_stack.py,sha256=SFbBPvvCopbyiuYtq-O5sQkFCf94Wzua6aDUXiFDSB4,26161
91
91
  cdk_factory/stack_library/buckets/README.md,sha256=XkK3UNVtRLE7NtUvbhCOBBYUYi8hlrrSaI1s3GJVrqI,78
92
92
  cdk_factory/stack_library/buckets/bucket_stack.py,sha256=SLoZqSffAqmeBBEVUQg54D_8Ad5UKdkjEAmKAVgAqQo,1778
@@ -136,8 +136,8 @@ cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITE
136
136
  cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
137
137
  cdk_factory/validation/config_validator.py,sha256=Pb0TkLiPFzUplBOgMorhRCVm08vEzZhRU5xXCDTa5CA,17602
138
138
  cdk_factory/workload/workload_factory.py,sha256=yDI3cRhVI5ELNDcJPLpk9UY54Uind1xQoV3spzT4z7E,6068
139
- cdk_factory-0.18.22.dist-info/METADATA,sha256=V-J7NzatfiQExE16n82Nvt_8ei7-C2C3Q8euLZdVM-k,2452
140
- cdk_factory-0.18.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
141
- cdk_factory-0.18.22.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
142
- cdk_factory-0.18.22.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
143
- cdk_factory-0.18.22.dist-info/RECORD,,
139
+ cdk_factory-0.18.25.dist-info/METADATA,sha256=iaMbsIWt-zcsrfraeJY_U7oOmsTj6dq44MbwD0G8_4E,2452
140
+ cdk_factory-0.18.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
141
+ cdk_factory-0.18.25.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
142
+ cdk_factory-0.18.25.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
143
+ cdk_factory-0.18.25.dist-info/RECORD,,