cdk-factory 0.15.10__py3-none-any.whl → 0.18.9__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.

Files changed (63) hide show
  1. cdk_factory/configurations/base_config.py +23 -24
  2. cdk_factory/configurations/cdk_config.py +6 -4
  3. cdk_factory/configurations/deployment.py +12 -0
  4. cdk_factory/configurations/devops.py +1 -1
  5. cdk_factory/configurations/pipeline_stage.py +29 -5
  6. cdk_factory/configurations/resources/acm.py +85 -0
  7. cdk_factory/configurations/resources/auto_scaling.py +7 -5
  8. cdk_factory/configurations/resources/cloudfront.py +7 -2
  9. cdk_factory/configurations/resources/ecr.py +1 -1
  10. cdk_factory/configurations/resources/ecs_cluster.py +108 -0
  11. cdk_factory/configurations/resources/ecs_service.py +17 -2
  12. cdk_factory/configurations/resources/load_balancer.py +17 -4
  13. cdk_factory/configurations/resources/monitoring.py +8 -3
  14. cdk_factory/configurations/resources/rds.py +305 -19
  15. cdk_factory/configurations/resources/rum.py +7 -2
  16. cdk_factory/configurations/resources/s3.py +1 -1
  17. cdk_factory/configurations/resources/security_group_full_stack.py +7 -8
  18. cdk_factory/configurations/resources/vpc.py +19 -0
  19. cdk_factory/configurations/workload.py +32 -2
  20. cdk_factory/constructs/ecr/ecr_construct.py +9 -2
  21. cdk_factory/constructs/lambdas/policies/policy_docs.py +4 -4
  22. cdk_factory/interfaces/istack.py +6 -3
  23. cdk_factory/interfaces/networked_stack_mixin.py +75 -0
  24. cdk_factory/interfaces/standardized_ssm_mixin.py +657 -0
  25. cdk_factory/interfaces/vpc_provider_mixin.py +210 -0
  26. cdk_factory/lambdas/edge/ip_gate/handler.py +42 -40
  27. cdk_factory/pipeline/pipeline_factory.py +222 -27
  28. cdk_factory/stack/stack_factory.py +34 -0
  29. cdk_factory/stack_library/__init__.py +3 -2
  30. cdk_factory/stack_library/acm/__init__.py +6 -0
  31. cdk_factory/stack_library/acm/acm_stack.py +169 -0
  32. cdk_factory/stack_library/api_gateway/api_gateway_stack.py +84 -59
  33. cdk_factory/stack_library/auto_scaling/auto_scaling_stack.py +366 -408
  34. cdk_factory/stack_library/code_artifact/code_artifact_stack.py +2 -2
  35. cdk_factory/stack_library/cognito/cognito_stack.py +152 -92
  36. cdk_factory/stack_library/dynamodb/dynamodb_stack.py +19 -15
  37. cdk_factory/stack_library/ecr/ecr_stack.py +2 -2
  38. cdk_factory/stack_library/ecs/__init__.py +12 -0
  39. cdk_factory/stack_library/ecs/ecs_cluster_stack.py +316 -0
  40. cdk_factory/stack_library/ecs/ecs_service_stack.py +20 -39
  41. cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py +2 -2
  42. cdk_factory/stack_library/load_balancer/load_balancer_stack.py +151 -118
  43. cdk_factory/stack_library/rds/rds_stack.py +85 -74
  44. cdk_factory/stack_library/route53/route53_stack.py +8 -3
  45. cdk_factory/stack_library/rum/rum_stack.py +108 -91
  46. cdk_factory/stack_library/security_group/security_group_full_stack.py +9 -22
  47. cdk_factory/stack_library/security_group/security_group_stack.py +11 -11
  48. cdk_factory/stack_library/stack_base.py +5 -0
  49. cdk_factory/stack_library/vpc/vpc_stack.py +272 -124
  50. cdk_factory/stack_library/websites/static_website_stack.py +1 -1
  51. cdk_factory/utilities/api_gateway_integration_utility.py +24 -16
  52. cdk_factory/utilities/environment_services.py +5 -5
  53. cdk_factory/utilities/json_loading_utility.py +12 -3
  54. cdk_factory/validation/config_validator.py +483 -0
  55. cdk_factory/version.py +1 -1
  56. cdk_factory/workload/workload_factory.py +1 -0
  57. {cdk_factory-0.15.10.dist-info → cdk_factory-0.18.9.dist-info}/METADATA +1 -1
  58. {cdk_factory-0.15.10.dist-info → cdk_factory-0.18.9.dist-info}/RECORD +61 -54
  59. cdk_factory/interfaces/enhanced_ssm_parameter_mixin.py +0 -321
  60. cdk_factory/interfaces/ssm_parameter_mixin.py +0 -329
  61. {cdk_factory-0.15.10.dist-info → cdk_factory-0.18.9.dist-info}/WHEEL +0 -0
  62. {cdk_factory-0.15.10.dist-info → cdk_factory-0.18.9.dist-info}/entry_points.txt +0 -0
  63. {cdk_factory-0.15.10.dist-info → cdk_factory-0.18.9.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,75 @@
1
+ """
2
+ Networked Stack Mixin - Combined SSM and VPC functionality for network-aware stacks
3
+ Maintainers: Eric Wilson
4
+ MIT License. See Project Root for license information.
5
+ """
6
+
7
+ from typing import Any
8
+ from aws_cdk import aws_ec2 as ec2
9
+ from .standardized_ssm_mixin import StandardizedSsmMixin
10
+ from .vpc_provider_mixin import VPCProviderMixin
11
+
12
+
13
+ class NetworkedStackMixin(StandardizedSsmMixin, VPCProviderMixin):
14
+ """
15
+ Combined mixin for stacks that need both SSM imports and VPC resolution.
16
+
17
+ This mixin provides a complete solution for network-aware stacks by combining:
18
+ - Enhanced SSM parameter import functionality (with standardized configuration)
19
+ - VPC resolution with multiple fallback strategies
20
+ - Standardized initialization patterns
21
+
22
+ Usage:
23
+ class MyStack(Stack, NetworkedStackMixin):
24
+ def __init__(self, scope, id, **kwargs):
25
+ super().__init__(scope, id, **kwargs)
26
+ # SSM initialization is handled automatically by StandardizedSsmMixin.__init__
27
+
28
+ def _build(self, stack_config, deployment, workload):
29
+ self.setup_ssm_integration(scope=self, config=stack_config.dictionary, resource_type="my-resource", resource_name="my-name")
30
+ self.vpc = self.resolve_vpc(stack_config, deployment, workload)
31
+ """
32
+
33
+ def _initialize_networked_stack(self) -> None:
34
+ """
35
+ Initialize all networked stack functionality.
36
+ Note: SSM initialization is handled by StandardizedSsmMixin.__init__
37
+ """
38
+ self._initialize_vpc_cache()
39
+
40
+ def build_networked_stack(
41
+ self,
42
+ config: Any,
43
+ deployment: Any,
44
+ workload: Any,
45
+ resource_type: str = "resource"
46
+ ) -> None:
47
+ """
48
+ Standard build sequence for networked stacks.
49
+
50
+ Args:
51
+ config: The stack configuration
52
+ deployment: The deployment configuration
53
+ workload: The workload configuration
54
+ resource_type: Type name for logging purposes
55
+ """
56
+ # Process SSM imports first (using enhanced SsmParameterMixin)
57
+ self.process_ssm_imports(config, deployment, resource_type)
58
+
59
+ # Store references for later use
60
+ self.config = config
61
+ self.deployment = deployment
62
+ self.workload = workload
63
+
64
+ @property
65
+ def vpc(self) -> ec2.IVpc:
66
+ """
67
+ Standard VPC property that uses the combined mixin functionality.
68
+
69
+ Returns:
70
+ Resolved VPC reference
71
+ """
72
+ if not hasattr(self, 'config') or not hasattr(self, 'deployment') or not hasattr(self, 'workload'):
73
+ raise AttributeError("Networked stack not properly initialized. Call build_networked_stack() first.")
74
+
75
+ return self.get_vpc_property(self.config, self.deployment, self.workload)