cdk-factory 0.16.15__py3-none-any.whl → 0.20.0__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/base_config.py +23 -24
- cdk_factory/configurations/cdk_config.py +1 -1
- cdk_factory/configurations/deployment.py +12 -0
- cdk_factory/configurations/devops.py +1 -1
- cdk_factory/configurations/resources/acm.py +9 -2
- cdk_factory/configurations/resources/auto_scaling.py +7 -5
- cdk_factory/configurations/resources/cloudfront.py +7 -2
- cdk_factory/configurations/resources/ecr.py +1 -1
- cdk_factory/configurations/resources/ecs_cluster.py +12 -5
- cdk_factory/configurations/resources/ecs_service.py +30 -3
- cdk_factory/configurations/resources/lambda_edge.py +18 -4
- cdk_factory/configurations/resources/load_balancer.py +8 -9
- cdk_factory/configurations/resources/monitoring.py +8 -3
- cdk_factory/configurations/resources/rds.py +8 -9
- cdk_factory/configurations/resources/route53.py +5 -0
- cdk_factory/configurations/resources/rum.py +7 -2
- cdk_factory/configurations/resources/s3.py +10 -2
- cdk_factory/configurations/resources/security_group_full_stack.py +7 -8
- cdk_factory/configurations/resources/vpc.py +19 -0
- cdk_factory/configurations/workload.py +32 -2
- cdk_factory/constructs/cloudfront/cloudfront_distribution_construct.py +1 -1
- cdk_factory/constructs/ecr/ecr_construct.py +9 -2
- cdk_factory/constructs/lambdas/policies/policy_docs.py +4 -4
- cdk_factory/interfaces/istack.py +4 -4
- cdk_factory/interfaces/networked_stack_mixin.py +6 -6
- cdk_factory/interfaces/standardized_ssm_mixin.py +684 -0
- cdk_factory/interfaces/vpc_provider_mixin.py +64 -33
- cdk_factory/lambdas/edge/ip_gate/handler.py +42 -40
- cdk_factory/pipeline/pipeline_factory.py +3 -3
- cdk_factory/stack_library/__init__.py +3 -2
- cdk_factory/stack_library/acm/acm_stack.py +7 -17
- cdk_factory/stack_library/api_gateway/api_gateway_stack.py +84 -59
- cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +454 -537
- cdk_factory/stack_library/cloudfront/cloudfront_stack.py +76 -22
- cdk_factory/stack_library/code_artifact/code_artifact_stack.py +5 -27
- cdk_factory/stack_library/cognito/cognito_stack.py +152 -92
- cdk_factory/stack_library/dynamodb/dynamodb_stack.py +19 -15
- cdk_factory/stack_library/ecr/ecr_stack.py +2 -2
- cdk_factory/stack_library/ecs/__init__.py +1 -3
- cdk_factory/stack_library/ecs/ecs_cluster_stack.py +159 -75
- cdk_factory/stack_library/ecs/ecs_service_stack.py +59 -52
- cdk_factory/stack_library/lambda_edge/EDGE_LOG_RETENTION_TODO.md +226 -0
- cdk_factory/stack_library/lambda_edge/LAMBDA_EDGE_LOG_RETENTION_BLOG.md +215 -0
- cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py +240 -83
- cdk_factory/stack_library/load_balancer/load_balancer_stack.py +139 -212
- cdk_factory/stack_library/rds/rds_stack.py +74 -98
- cdk_factory/stack_library/route53/route53_stack.py +246 -40
- cdk_factory/stack_library/rum/rum_stack.py +108 -91
- cdk_factory/stack_library/security_group/security_group_full_stack.py +10 -53
- cdk_factory/stack_library/security_group/security_group_stack.py +12 -19
- cdk_factory/stack_library/simple_queue_service/sqs_stack.py +1 -34
- cdk_factory/stack_library/stack_base.py +5 -0
- cdk_factory/stack_library/vpc/vpc_stack.py +171 -130
- cdk_factory/stack_library/websites/static_website_stack.py +7 -3
- cdk_factory/utilities/api_gateway_integration_utility.py +24 -16
- cdk_factory/utilities/environment_services.py +5 -5
- cdk_factory/utilities/json_loading_utility.py +1 -1
- cdk_factory/validation/config_validator.py +483 -0
- cdk_factory/version.py +1 -1
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/METADATA +1 -1
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/RECORD +64 -62
- cdk_factory/interfaces/enhanced_ssm_parameter_mixin.py +0 -321
- cdk_factory/interfaces/ssm_parameter_mixin.py +0 -454
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/WHEEL +0 -0
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/entry_points.txt +0 -0
- {cdk_factory-0.16.15.dist-info → cdk_factory-0.20.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -35,18 +35,18 @@ class ResourceResolver:
|
|
|
35
35
|
"""Get or create enhanced SSM parameter mixin"""
|
|
36
36
|
if self._ssm_mixin is None:
|
|
37
37
|
try:
|
|
38
|
-
from cdk_factory.interfaces.
|
|
39
|
-
|
|
38
|
+
from cdk_factory.interfaces.standardized_ssm_mixin import (
|
|
39
|
+
StandardizedSsmMixin,
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
-
self._ssm_mixin =
|
|
42
|
+
self._ssm_mixin = StandardizedSsmMixin()
|
|
43
43
|
|
|
44
44
|
# Setup enhanced SSM integration if lambda config has SSM settings
|
|
45
45
|
lambda_dict = getattr(self.lambda_config, "dictionary", {})
|
|
46
46
|
ssm_config = lambda_dict.get("ssm", {})
|
|
47
47
|
|
|
48
48
|
if ssm_config.get("enabled", False):
|
|
49
|
-
self._ssm_mixin.
|
|
49
|
+
self._ssm_mixin.setup_ssm_integration(
|
|
50
50
|
scope=self.scope,
|
|
51
51
|
config=lambda_dict,
|
|
52
52
|
resource_type="lambda",
|
cdk_factory/interfaces/istack.py
CHANGED
|
@@ -8,14 +8,14 @@ from abc import ABCMeta, abstractmethod
|
|
|
8
8
|
import jsii
|
|
9
9
|
from constructs import Construct
|
|
10
10
|
from aws_cdk import Stack
|
|
11
|
-
from cdk_factory.interfaces.
|
|
11
|
+
from cdk_factory.interfaces.standardized_ssm_mixin import StandardizedSsmMixin
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class StackABCMeta(jsii.JSIIMeta, ABCMeta):
|
|
15
15
|
"""StackABCMeta"""
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class IStack(Stack,
|
|
18
|
+
class IStack(Stack, StandardizedSsmMixin, metaclass=StackABCMeta):
|
|
19
19
|
"""
|
|
20
20
|
IStack for Dynamically loaded Factory Stacks
|
|
21
21
|
Only imports from constructs and abc to avoid circular dependencies.
|
|
@@ -25,8 +25,8 @@ class IStack(Stack, SsmParameterMixin, metaclass=StackABCMeta):
|
|
|
25
25
|
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
|
|
26
26
|
# Initialize Stack first
|
|
27
27
|
Stack.__init__(self, scope, id, **kwargs)
|
|
28
|
-
# Initialize
|
|
29
|
-
|
|
28
|
+
# Initialize StandardizedSsmMixin (no super() call to avoid MRO issues)
|
|
29
|
+
StandardizedSsmMixin.__init__(self, **kwargs)
|
|
30
30
|
|
|
31
31
|
@abstractmethod
|
|
32
32
|
def build(self, *, stack_config, deployment, workload) -> None:
|
|
@@ -6,16 +6,16 @@ MIT License. See Project Root for license information.
|
|
|
6
6
|
|
|
7
7
|
from typing import Any
|
|
8
8
|
from aws_cdk import aws_ec2 as ec2
|
|
9
|
-
from .
|
|
9
|
+
from .standardized_ssm_mixin import StandardizedSsmMixin
|
|
10
10
|
from .vpc_provider_mixin import VPCProviderMixin
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class NetworkedStackMixin(
|
|
13
|
+
class NetworkedStackMixin(StandardizedSsmMixin, VPCProviderMixin):
|
|
14
14
|
"""
|
|
15
15
|
Combined mixin for stacks that need both SSM imports and VPC resolution.
|
|
16
16
|
|
|
17
17
|
This mixin provides a complete solution for network-aware stacks by combining:
|
|
18
|
-
- Enhanced SSM parameter import functionality (with
|
|
18
|
+
- Enhanced SSM parameter import functionality (with standardized configuration)
|
|
19
19
|
- VPC resolution with multiple fallback strategies
|
|
20
20
|
- Standardized initialization patterns
|
|
21
21
|
|
|
@@ -23,17 +23,17 @@ class NetworkedStackMixin(SsmParameterMixin, VPCProviderMixin):
|
|
|
23
23
|
class MyStack(Stack, NetworkedStackMixin):
|
|
24
24
|
def __init__(self, scope, id, **kwargs):
|
|
25
25
|
super().__init__(scope, id, **kwargs)
|
|
26
|
-
# SSM initialization is handled automatically by
|
|
26
|
+
# SSM initialization is handled automatically by StandardizedSsmMixin.__init__
|
|
27
27
|
|
|
28
28
|
def _build(self, stack_config, deployment, workload):
|
|
29
|
-
self.
|
|
29
|
+
self.setup_ssm_integration(scope=self, config=stack_config.dictionary, resource_type="my-resource", resource_name="my-name")
|
|
30
30
|
self.vpc = self.resolve_vpc(stack_config, deployment, workload)
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
33
|
def _initialize_networked_stack(self) -> None:
|
|
34
34
|
"""
|
|
35
35
|
Initialize all networked stack functionality.
|
|
36
|
-
Note: SSM initialization is handled by
|
|
36
|
+
Note: SSM initialization is handled by StandardizedSsmMixin.__init__
|
|
37
37
|
"""
|
|
38
38
|
self._initialize_vpc_cache()
|
|
39
39
|
|