cdk-factory 0.16.14__py3-none-any.whl → 0.16.16__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.
- cdk_factory/configurations/resources/ecs_service.py +10 -0
- cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +35 -8
- cdk_factory/stack_library/ecs/ecs_service_stack.py +8 -2
- cdk_factory/version.py +1 -1
- {cdk_factory-0.16.14.dist-info → cdk_factory-0.16.16.dist-info}/METADATA +1 -1
- {cdk_factory-0.16.14.dist-info → cdk_factory-0.16.16.dist-info}/RECORD +9 -9
- {cdk_factory-0.16.14.dist-info → cdk_factory-0.16.16.dist-info}/WHEEL +0 -0
- {cdk_factory-0.16.14.dist-info → cdk_factory-0.16.16.dist-info}/entry_points.txt +0 -0
- {cdk_factory-0.16.14.dist-info → cdk_factory-0.16.16.dist-info}/licenses/LICENSE +0 -0
|
@@ -141,6 +141,16 @@ class EcsServiceConfig:
|
|
|
141
141
|
"""Deployment type: production, maintenance, or blue-green"""
|
|
142
142
|
return self._config.get("deployment_type", "production")
|
|
143
143
|
|
|
144
|
+
@property
|
|
145
|
+
def deployment_circuit_breaker(self) -> Dict[str, Any]:
|
|
146
|
+
"""Deployment circuit breaker configuration"""
|
|
147
|
+
return self._config.get("deployment_circuit_breaker", {})
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def deployment_configuration(self) -> Dict[str, Any]:
|
|
151
|
+
"""Deployment configuration (maximum_percent, minimum_healthy_percent)"""
|
|
152
|
+
return self._config.get("deployment_configuration", {})
|
|
153
|
+
|
|
144
154
|
@property
|
|
145
155
|
def is_maintenance_mode(self) -> bool:
|
|
146
156
|
"""Whether this is a maintenance mode deployment"""
|
|
@@ -167,23 +167,50 @@ class AutoScalingStack(IStack, VPCProviderMixin):
|
|
|
167
167
|
def _get_security_groups(self) -> List[ec2.ISecurityGroup]:
|
|
168
168
|
"""Get security groups for the Auto Scaling Group"""
|
|
169
169
|
security_groups = []
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
|
|
171
|
+
# Check if we have SSM imports for security groups using enhanced mixin
|
|
172
|
+
if self.has_ssm_import("security_group_ids"):
|
|
173
|
+
imported_sg_ids = self.get_ssm_imported_value("security_group_ids", [])
|
|
174
|
+
if isinstance(imported_sg_ids, list):
|
|
175
|
+
for idx, sg_id in enumerate(imported_sg_ids):
|
|
175
176
|
security_groups.append(
|
|
176
177
|
ec2.SecurityGroup.from_security_group_id(
|
|
177
|
-
self, f"SecurityGroup-{
|
|
178
|
+
self, f"SecurityGroup-SSM-{idx}", sg_id
|
|
178
179
|
)
|
|
179
180
|
)
|
|
181
|
+
logger.info(f"Added {len(imported_sg_ids)} security groups from SSM imports")
|
|
180
182
|
else:
|
|
181
|
-
# TODO: add some additional checks to make it more robust
|
|
182
183
|
security_groups.append(
|
|
183
184
|
ec2.SecurityGroup.from_security_group_id(
|
|
184
|
-
self, f"SecurityGroup-
|
|
185
|
+
self, f"SecurityGroup-SSM-0", imported_sg_ids
|
|
185
186
|
)
|
|
186
187
|
)
|
|
188
|
+
logger.info(f"Added security group from SSM imports")
|
|
189
|
+
|
|
190
|
+
# Also check if we have any directly defined in the config
|
|
191
|
+
if self.asg_config.security_group_ids:
|
|
192
|
+
for idx, sg_id in enumerate(self.asg_config.security_group_ids):
|
|
193
|
+
logger.info(f"Adding security group from direct config: {sg_id}")
|
|
194
|
+
# if the security group id contains a comma, it is a list of security group ids
|
|
195
|
+
if "," in sg_id:
|
|
196
|
+
blocks = sg_id.split(",")
|
|
197
|
+
for block_idx, block in enumerate(blocks):
|
|
198
|
+
security_groups.append(
|
|
199
|
+
ec2.SecurityGroup.from_security_group_id(
|
|
200
|
+
self, f"SecurityGroup-Direct-{idx}-{block_idx}", block
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
else:
|
|
204
|
+
# TODO: add some additional checks to make it more robust
|
|
205
|
+
security_groups.append(
|
|
206
|
+
ec2.SecurityGroup.from_security_group_id(
|
|
207
|
+
self, f"SecurityGroup-Direct-{idx}", sg_id
|
|
208
|
+
)
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
if not security_groups:
|
|
212
|
+
logger.warning("No security groups found from SSM imports or direct configuration")
|
|
213
|
+
|
|
187
214
|
return security_groups
|
|
188
215
|
|
|
189
216
|
def _create_instance_role(self, asg_name: str) -> iam.Role:
|
|
@@ -450,7 +450,10 @@ class EcsServiceStack(IStack, EnhancedSsmParameterMixin):
|
|
|
450
450
|
health_check_grace_period=cdk.Duration.seconds(
|
|
451
451
|
self.ecs_config.health_check_grace_period
|
|
452
452
|
) if self.ecs_config.target_group_arns else None,
|
|
453
|
-
circuit_breaker=ecs.DeploymentCircuitBreaker(
|
|
453
|
+
circuit_breaker=ecs.DeploymentCircuitBreaker(
|
|
454
|
+
enable=self.ecs_config.deployment_circuit_breaker.get("enable", True),
|
|
455
|
+
rollback=self.ecs_config.deployment_circuit_breaker.get("rollback", True)
|
|
456
|
+
) if self.ecs_config.deployment_circuit_breaker else None,
|
|
454
457
|
placement_strategies=self._get_placement_strategies(),
|
|
455
458
|
placement_constraints=self._get_placement_constraints(),
|
|
456
459
|
)
|
|
@@ -470,7 +473,10 @@ class EcsServiceStack(IStack, EnhancedSsmParameterMixin):
|
|
|
470
473
|
health_check_grace_period=cdk.Duration.seconds(
|
|
471
474
|
self.ecs_config.health_check_grace_period
|
|
472
475
|
) if self.ecs_config.target_group_arns else None,
|
|
473
|
-
circuit_breaker=ecs.DeploymentCircuitBreaker(
|
|
476
|
+
circuit_breaker=ecs.DeploymentCircuitBreaker(
|
|
477
|
+
enable=self.ecs_config.deployment_circuit_breaker.get("enable", True),
|
|
478
|
+
rollback=self.ecs_config.deployment_circuit_breaker.get("rollback", True)
|
|
479
|
+
) if self.ecs_config.deployment_circuit_breaker else None,
|
|
474
480
|
)
|
|
475
481
|
|
|
476
482
|
# Attach to load balancer target groups
|
cdk_factory/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.16.
|
|
1
|
+
__version__ = "0.16.16"
|
|
@@ -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=
|
|
5
|
+
cdk_factory/version.py,sha256=kK5rrPE-6dzYRJbDYgebmadMfxNDB079YPndXy6QJP4,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=JKjhNsy0RCUZy1s8n5D_aXXI-upR9izaLtCTfKYiV9k,9624
|
|
@@ -32,7 +32,7 @@ cdk_factory/configurations/resources/docker.py,sha256=hUbuxkuhcQu9LnLX7I8_57eTmH
|
|
|
32
32
|
cdk_factory/configurations/resources/dynamodb.py,sha256=HsZMOaRwfuNPwKIzokeeE3f5zAQLTB5hRb_GzYq2ibg,2903
|
|
33
33
|
cdk_factory/configurations/resources/ecr.py,sha256=o9hHzEBVPoxUvWZGXGbRJ-98FmP6fMLY5a1-qg42jL0,8253
|
|
34
34
|
cdk_factory/configurations/resources/ecs_cluster.py,sha256=oz8bXdW8dxYWQX0VIjvgAQA8quXJFF0NBTvtksS2vN4,3527
|
|
35
|
-
cdk_factory/configurations/resources/ecs_service.py,sha256=
|
|
35
|
+
cdk_factory/configurations/resources/ecs_service.py,sha256=dqckXUZmYaIXFxgqXCr8GxjJe8LgET1XycSXfZegkBI,5341
|
|
36
36
|
cdk_factory/configurations/resources/exisiting.py,sha256=EVOLnkB-DGfTlmDgyQ5DD5k2zYfpFxqI3gugDR7mifI,478
|
|
37
37
|
cdk_factory/configurations/resources/lambda_edge.py,sha256=MjmiwDkys4aoRvDQhH3MT6BgeShzJXNWL7761HJrLtQ,3404
|
|
38
38
|
cdk_factory/configurations/resources/lambda_function.py,sha256=VENZ9-ABJ5mjcN8J8wdLH4KHDYr1kWO0iFDH0B2mJXA,14659
|
|
@@ -87,7 +87,7 @@ cdk_factory/stack_library/acm/__init__.py,sha256=4FNRLykblcKZvq_wieYwvv9N_jgrZnJ
|
|
|
87
87
|
cdk_factory/stack_library/acm/acm_stack.py,sha256=hflRXyOSjqGeJxBx87EV3Z3MJ5HEX2rnrjJ_E9wwhH8,5862
|
|
88
88
|
cdk_factory/stack_library/api_gateway/api_gateway_stack.py,sha256=l6J5uurBQqbhj9JuvQitV9PiIHS5kqa-dFWifCeA3GM,39347
|
|
89
89
|
cdk_factory/stack_library/auto_scaling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
-
cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=
|
|
90
|
+
cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py,sha256=Lr0ESIg-zlEZaO8YjyZp4ybXlk8X44KL4DKZ52OBERo,31566
|
|
91
91
|
cdk_factory/stack_library/aws_lambdas/lambda_stack.py,sha256=SFbBPvvCopbyiuYtq-O5sQkFCf94Wzua6aDUXiFDSB4,26161
|
|
92
92
|
cdk_factory/stack_library/buckets/README.md,sha256=XkK3UNVtRLE7NtUvbhCOBBYUYi8hlrrSaI1s3GJVrqI,78
|
|
93
93
|
cdk_factory/stack_library/buckets/bucket_stack.py,sha256=SLoZqSffAqmeBBEVUQg54D_8Ad5UKdkjEAmKAVgAqQo,1778
|
|
@@ -100,7 +100,7 @@ cdk_factory/stack_library/ecr/README.md,sha256=xw2wPx9WN03Y4BBwqvbi9lAFGNyaD1FUN
|
|
|
100
100
|
cdk_factory/stack_library/ecr/ecr_stack.py,sha256=1xA68sxFVyqreYjXrP_7U9I8RF9RtFeR6KeEfSWuC2U,2118
|
|
101
101
|
cdk_factory/stack_library/ecs/__init__.py,sha256=ZZLBmuSt6z_cnFz6OkIFv_APmjqf706wWROruZGyFEI,289
|
|
102
102
|
cdk_factory/stack_library/ecs/ecs_cluster_stack.py,sha256=epDF28JlBMgq9UlOlv1PkwhTYuX2ghqe2Af6ruyMtnE,7863
|
|
103
|
-
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=
|
|
103
|
+
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=WYpHUFW_ruMWje-YgsSbPETG8Y4mrvj-KfIQrebuVfM,27909
|
|
104
104
|
cdk_factory/stack_library/lambda_edge/__init__.py,sha256=ByBJ_CWdc4UtTmFBZH-6pzBMNkjkdtE65AmnB0Fs6lM,156
|
|
105
105
|
cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py,sha256=CdId_1kcZmYr1lLI9AD3-KqtE6voC3641PIloJmWiNI,16414
|
|
106
106
|
cdk_factory/stack_library/load_balancer/__init__.py,sha256=wZpKw2OecLJGdF5mPayCYAEhu2H3c2gJFFIxwXftGDU,52
|
|
@@ -136,8 +136,8 @@ cdk_factory/utilities/lambda_function_utilities.py,sha256=S1GvBsY_q2cyUiaud3HORJ
|
|
|
136
136
|
cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITEP7EuSU,1019
|
|
137
137
|
cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
|
|
138
138
|
cdk_factory/workload/workload_factory.py,sha256=yDI3cRhVI5ELNDcJPLpk9UY54Uind1xQoV3spzT4z7E,6068
|
|
139
|
-
cdk_factory-0.16.
|
|
140
|
-
cdk_factory-0.16.
|
|
141
|
-
cdk_factory-0.16.
|
|
142
|
-
cdk_factory-0.16.
|
|
143
|
-
cdk_factory-0.16.
|
|
139
|
+
cdk_factory-0.16.16.dist-info/METADATA,sha256=qn2yzeK1qYzRisvlYmFuLhOc9RCs2iaW3tVttUk2u78,2452
|
|
140
|
+
cdk_factory-0.16.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
141
|
+
cdk_factory-0.16.16.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
|
|
142
|
+
cdk_factory-0.16.16.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
|
|
143
|
+
cdk_factory-0.16.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|