cdk-factory 0.17.0__py3-none-any.whl → 0.17.1__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/interfaces/vpc_provider_mixin.py +13 -3
- cdk_factory/stack_library/auto_scaling/auto_scaling_stack_standardized.py +2 -2
- cdk_factory/stack_library/rum/rum_stack.py +17 -11
- cdk_factory/version.py +1 -1
- {cdk_factory-0.17.0.dist-info → cdk_factory-0.17.1.dist-info}/METADATA +1 -1
- {cdk_factory-0.17.0.dist-info → cdk_factory-0.17.1.dist-info}/RECORD +9 -9
- {cdk_factory-0.17.0.dist-info → cdk_factory-0.17.1.dist-info}/WHEEL +0 -0
- {cdk_factory-0.17.0.dist-info → cdk_factory-0.17.1.dist-info}/entry_points.txt +0 -0
- {cdk_factory-0.17.0.dist-info → cdk_factory-0.17.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,7 +6,7 @@ MIT License. See Project Root for license information.
|
|
|
6
6
|
|
|
7
7
|
from typing import Optional, List, Any
|
|
8
8
|
from aws_lambda_powertools import Logger
|
|
9
|
-
from aws_cdk import aws_ec2 as ec2
|
|
9
|
+
from aws_cdk import aws_ec2 as ec2, aws_ssm as ssm
|
|
10
10
|
from constructs import Construct
|
|
11
11
|
|
|
12
12
|
logger = Logger(__name__)
|
|
@@ -113,16 +113,26 @@ class VPCProviderMixin:
|
|
|
113
113
|
Create VPC reference from SSM imported VPC ID.
|
|
114
114
|
|
|
115
115
|
Args:
|
|
116
|
-
vpc_id: The VPC ID from SSM
|
|
116
|
+
vpc_id: The VPC ID from SSM (can be SSM path or actual VPC ID)
|
|
117
117
|
availability_zones: List of availability zones
|
|
118
118
|
subnet_ids: Optional list of subnet IDs from SSM
|
|
119
119
|
|
|
120
120
|
Returns:
|
|
121
121
|
VPC reference created from attributes
|
|
122
122
|
"""
|
|
123
|
+
# Check if vpc_id is an SSM path (starts with /) or actual VPC ID
|
|
124
|
+
if vpc_id.startswith('/'):
|
|
125
|
+
# Create CDK token for VPC ID from SSM parameter
|
|
126
|
+
vpc_id_token = ssm.StringParameter.from_string_parameter_name(
|
|
127
|
+
self, f"{self.stack_name}-VPC-ID-Token", vpc_id
|
|
128
|
+
).string_value
|
|
129
|
+
else:
|
|
130
|
+
# Use the VPC ID directly (for testing or direct configuration)
|
|
131
|
+
vpc_id_token = vpc_id
|
|
132
|
+
|
|
123
133
|
# Build VPC attributes
|
|
124
134
|
vpc_attrs = {
|
|
125
|
-
"vpc_id":
|
|
135
|
+
"vpc_id": vpc_id_token,
|
|
126
136
|
"availability_zones": availability_zones,
|
|
127
137
|
}
|
|
128
138
|
|
|
@@ -137,8 +137,8 @@ class AutoScalingStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
137
137
|
logger.info(f"Auto Scaling Group {asg_name} built successfully")
|
|
138
138
|
|
|
139
139
|
def _get_ssm_imports(self) -> Dict[str, Any]:
|
|
140
|
-
"""Get SSM imports from
|
|
141
|
-
return self.
|
|
140
|
+
"""Get SSM imports from standardized mixin processing"""
|
|
141
|
+
return self.get_all_ssm_imports()
|
|
142
142
|
|
|
143
143
|
def _get_security_groups(self) -> List[ec2.ISecurityGroup]:
|
|
144
144
|
"""
|
|
@@ -59,14 +59,18 @@ class RumStack(IStack, StandardizedSsmMixin):
|
|
|
59
59
|
|
|
60
60
|
# Configure SSM imports for cognito resources if needed
|
|
61
61
|
if not self.rum_config.cognito_identity_pool_id:
|
|
62
|
-
#
|
|
63
|
-
if
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
# Only add SSM imports if we have the required template variables
|
|
63
|
+
# Check if deployment has organization info for template resolution
|
|
64
|
+
if (hasattr(deployment, 'organization') and deployment.organization and
|
|
65
|
+
hasattr(deployment, 'environment') and deployment.environment):
|
|
66
|
+
# Add explicit import path for cognito identity pool using new pattern
|
|
67
|
+
if "ssm" not in rum_config:
|
|
68
|
+
rum_config["ssm"] = {}
|
|
69
|
+
if "imports" not in rum_config["ssm"]:
|
|
70
|
+
rum_config["ssm"]["imports"] = {}
|
|
71
|
+
rum_config["ssm"]["imports"][
|
|
72
|
+
"cognito_identity_pool_id"
|
|
73
|
+
] = "/{{ORGANIZATION}}/{{ENVIRONMENT}}/cognito/user-pool/identity-pool-id"
|
|
70
74
|
|
|
71
75
|
self.setup_standardized_ssm_integration(
|
|
72
76
|
scope=self,
|
|
@@ -75,6 +79,9 @@ class RumStack(IStack, StandardizedSsmMixin):
|
|
|
75
79
|
resource_name=self.rum_config.name,
|
|
76
80
|
)
|
|
77
81
|
|
|
82
|
+
# Process SSM imports using standardized method
|
|
83
|
+
self.process_standardized_ssm_imports()
|
|
84
|
+
|
|
78
85
|
# Import or create Cognito resources
|
|
79
86
|
identity_pool_id, guest_role_arn = self._setup_cognito_integration()
|
|
80
87
|
|
|
@@ -97,9 +104,8 @@ class RumStack(IStack, StandardizedSsmMixin):
|
|
|
97
104
|
identity_pool_id = self.rum_config.cognito_identity_pool_id
|
|
98
105
|
logger.info(f"Using existing Cognito Identity Pool: {identity_pool_id}")
|
|
99
106
|
else:
|
|
100
|
-
# Try to import from SSM using
|
|
101
|
-
|
|
102
|
-
cognito_identity_pool_id = ssm_imports.get("cognito_identity_pool_id")
|
|
107
|
+
# Try to import from SSM using standardized approach
|
|
108
|
+
cognito_identity_pool_id = self.get_ssm_imported_value("cognito_identity_pool_id")
|
|
103
109
|
|
|
104
110
|
if cognito_identity_pool_id:
|
|
105
111
|
identity_pool_id = cognito_identity_pool_id
|
cdk_factory/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.17.
|
|
1
|
+
__version__ = "0.17.1"
|
|
@@ -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=mrwBkyZNcMowMG4-KslRvuWjlT2xdlnWDSWDZEK270s,23
|
|
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
|
|
@@ -67,7 +67,7 @@ cdk_factory/interfaces/istack.py,sha256=3xqGw5kNTt_KeLHdMxI7rIR0YORqcWQOqsacmDlT
|
|
|
67
67
|
cdk_factory/interfaces/live_ssm_resolver.py,sha256=3FIr9a02SXqZmbFs3RT0WxczWEQR_CF7QSt7kWbDrVE,8163
|
|
68
68
|
cdk_factory/interfaces/networked_stack_mixin.py,sha256=69pJp4IE1n_tdHh2UZQ08O6ZW-v5P4uJJ_fleNaj6Nw,2897
|
|
69
69
|
cdk_factory/interfaces/standardized_ssm_mixin.py,sha256=-BT-K7mro2f3taS7biAm_oaxC7z2lurUfNUpryvahXk,22680
|
|
70
|
-
cdk_factory/interfaces/vpc_provider_mixin.py,sha256=
|
|
70
|
+
cdk_factory/interfaces/vpc_provider_mixin.py,sha256=tfe3XqWd4lf5mMHGKexDcWmS0T2CKHSP0TDDyp6MPoY,8363
|
|
71
71
|
cdk_factory/lambdas/health_handler.py,sha256=dd40ykKMxWCFEIyp2ZdQvAGNjw_ylI9CSm1N24Hp2ME,196
|
|
72
72
|
cdk_factory/lambdas/edge/ip_gate/handler.py,sha256=gUevgX462mqGYddtQIyJ1-Jk3oXhFmbmd46jlqjai9E,10657
|
|
73
73
|
cdk_factory/pipeline/path_utils.py,sha256=fvWdrcb4onmpIu1APkHLhXg8zWfK74HcW3Ra2ynxfXM,2586
|
|
@@ -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=_wbPBsgh7FHq9cnL44CiuffBj3XCO5ErQx_yclxFsVY,39669
|
|
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_standardized.py,sha256=
|
|
89
|
+
cdk_factory/stack_library/auto_scaling/auto_scaling_stack_standardized.py,sha256=wpR8m4JuM5BaKNOAQ4SPUbmsnpd1QQWSqffpNVMgZ8w,21991
|
|
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
|
|
@@ -111,7 +111,7 @@ cdk_factory/stack_library/rds/rds_stack.py,sha256=YwRLvqfIEDE5uwocnr7HpmniIfEF5O
|
|
|
111
111
|
cdk_factory/stack_library/route53/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
112
112
|
cdk_factory/stack_library/route53/route53_stack.py,sha256=mPUJta6maUNlkXup7xKsqq7gefsRI1w_ulInE29wJs4,8387
|
|
113
113
|
cdk_factory/stack_library/rum/__init__.py,sha256=gUrWQdzd4rZ2J0YzAQC8PsEGAS7QgyYjB2ZCUKWasy4,90
|
|
114
|
-
cdk_factory/stack_library/rum/rum_stack.py,sha256=
|
|
114
|
+
cdk_factory/stack_library/rum/rum_stack.py,sha256=BEXsx_PsZOu2dR3Pmv1_flY51uRIeHP5l5rj96bOgPQ,14106
|
|
115
115
|
cdk_factory/stack_library/security_group/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
116
116
|
cdk_factory/stack_library/security_group/security_group_full_stack.py,sha256=yvZ5QS9eDj_LkkwHY_Pcb37lOVPbGMfSdizZa1X6BEI,13561
|
|
117
117
|
cdk_factory/stack_library/security_group/security_group_stack.py,sha256=Zv9FCEHvSBT1cM9bXOtyIUFwhRHKCSTgvaqOyhGj0wg,14456
|
|
@@ -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.17.
|
|
140
|
-
cdk_factory-0.17.
|
|
141
|
-
cdk_factory-0.17.
|
|
142
|
-
cdk_factory-0.17.
|
|
143
|
-
cdk_factory-0.17.
|
|
139
|
+
cdk_factory-0.17.1.dist-info/METADATA,sha256=QsfBZYH1eNv5dbrtrnO_easMFgIPTn1qHdzE4v7cpXQ,2451
|
|
140
|
+
cdk_factory-0.17.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
141
|
+
cdk_factory-0.17.1.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
|
|
142
|
+
cdk_factory-0.17.1.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
|
|
143
|
+
cdk_factory-0.17.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|