cdk-factory 0.16.15__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.

@@ -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
- for sg_id in self.asg_config.security_group_ids:
171
- # if the security group id contains a comma, it is a list of security group ids
172
- if "," in sg_id:
173
- blocks = sg_id.split(",")
174
- for block in blocks:
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-{block}", block
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-{sg_id}", sg_id
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:
cdk_factory/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.16.15"
1
+ __version__ = "0.16.16"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdk_factory
3
- Version: 0.16.15
3
+ Version: 0.16.16
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=Azoo055kJozZURSVgiLattbf2Jz2HF7CxKYQAdjTAfw,24
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
@@ -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=8Ho7QLbW0MLEmnD0ApglFgZC8Bh5ODT2jERNoAUxz3Y,30128
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
@@ -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.15.dist-info/METADATA,sha256=wESUjHCbYS9Yh3uYZMcxEowPcMsTWfzAosK6FViRUyM,2452
140
- cdk_factory-0.16.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
141
- cdk_factory-0.16.15.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
142
- cdk_factory-0.16.15.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
143
- cdk_factory-0.16.15.dist-info/RECORD,,
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,,